AMSPaymentElement
This class is the main entry point for the Payment Element Android SDK. Use this class to create Payment Element instances on frontend pages. When creating an instance, you need to pass an AMSBaseConfiguration as a parameter through AMSPaymentElement.Builder to complete the parameterized configuration, including environment, language, and payment session data (paymentSessionData) obtained from the server. The instance can be used for initializing configuration, component mounting, and payment event handling.
Constructor
Java
Kotlin
copy
public class AMSPaymentElement {
public static class Builder { ... }
}Create instances
Create instances by following these steps:
- Create an instance using
AMSPaymentElement.Builder. - Build an
AMSBaseConfigurationconfiguration object.