Skip to main content
The state object represents the internal state of the fields. The current state is included on every change event. You can also always call the getState() method to retrieve the current state of the fields.

Props

string
required
The current active form. This can be either card or ach. The active form determines which fields are loaded.
object
Information about the card number that was entered. This is only populated when the activeForm is card and the card number field has been filled.
enum
required
The processing environment. This can be either sandbox or production.
object
required
The state of the hosted fields.
boolean
required
true when the SDK is still initializing.
boolean
required
true after sdk.submitFields() is called and before the fields are done submitting their data.
The payment link object, if applicable.
string
This indicates the payment method for the transaction. When activeForm is ach, this will be ACH. When activeForm is card, this will be either CREDIT or DEBIT depending on the card type. Possible values are: ACH | CREDIT | DEBIT
string
required
The type of session. Possible values are: payment | save_payment_method
object
required
Surcharging information. This is only applicable when the activeForm is card. It provides details about whether surcharging is active, the rate, and whether it will be applied.
object
Set when there is an initialization error.