AMSPaymentElement

This class represents payment element components. Use this class to initialize the SDK, create and display payment page, confirm payments, and manage component lifecycles.

Constructor

copy
final element = AMSPaymentElement();

Create a new instance of AMSPaymentElement.

Relevant methods

Method

Description

init()

Use the SDK to configure parameter initialization instances.

createComponent()

Create and display the payment component UI. This method is mutually exclusive with the confirmPayment() method.

confirmPayment()

Submit and confirm the payment for the current component instance. This method is mutually exclusive with the createComponent() method.

setOnSubmitPayListener()

Register a callback listener for the payment commit event.

reset()

Reset component state without releasing the listener.

destroy()

Destroy instances and release all resources.