createPaymentMethodManager(
type: string
): Promise<
| ICardPaymentMethodManager
| INativePaymentMethodManager
| IRedirectPaymentMethodManager
| IKlarnaPaymentMethodManager
| IAchPaymentMethodManager
| null
>
type
provided as first argument:
Card, Native, Redirect, Klarna Payment Method and ACH.
In case the type specified is not supported, the function will return null
instead.
createPaymentMethodManager(
type: "PAYMENT_CARD",
options?: PaymentMethodManagerOptions
): Promise<ICardPaymentMethodManager | null>
ICardPaymentMethodManager
, which can be used to manage credit card payments.
Hide Parameters
Hide Properties
CardMetadata
object as its argument.Show CardMetadata
event
of type CardNetworkChangeEvent
.Hide CardNetworkChangeEvent
detectedCardNetworks.preferred ?? detectedCardNetworks.items[0]
Show CardNetworks
items
.
In case no network is allowed, undefined
.undefined
. Otherwise, all the allowed cards.Use this to show the card networks the user can choose from in the case of a co-badged cards.Show CardNetworks
items
.
In case no network is allowed, undefined
.Show Values
LOCAL
).event.source === 'REMOTE'
in onCardNetworksChange
.Hide Promise<ICardPaymentMethodManager | null>
ICardPaymentMethodManager
or null
.Show ICardPaymentMethodManager
cardNumberInput
, expiryInput
, and cvvInput
.Show HostedInputs
Show Validation
Show InputValidationError
cardNameRequired
: cardholder’s name is not provided.cardNameContainsNumbers
: cardholder’s name contains numbers.cardNameLength
: cardholder’s name does not match the expected length (minimum: 2, maximum: 45 characters).cardNameContainsInvalidCharacters
: cardholder’s name contains characters that are not supported (only Latin characters are allowed).cardRequired
: card number is not provided.unsupportedCardType
: provided card number does not match the allowed card networks.cardIncomplete
: provided card number does not match the expected length.cardInvalid
: provided card number is invalid. Additional details might be available in the message
field.cvvRequired
: card’s security code (CVV) is not provided.cvvIncomplete
: card’s security code (CVV) does not match the expected length (minimum: 3 characters).cvvInvalid3
: card’s security code (CVV) does not match the expected length (exact: 3 characters).cvvInvalid4
: card’s security code (CVV) does not match the expected length (exact: 4 characters).expiryRequired
: card’s expiry date is not provided.cardExpired
: card has expired.expiryMonthInvalid
: expiry date’s month is invalid.expiryYearInvalid
: expiry date’s year is invalid.createPaymentMethodManager(
type: "PAYPAL" | "GOOGLE_PAY" | "APPLE_PAY",
): Promise<INativePaymentMethodManager | null>
INativePaymentMethodManager
, which can be used to manage native payment methods like
PayPal, Google Pay, and Apple Pay.
Hide Parameters
Hide Promise<INativePaymentMethodManager | null>
INativePaymentMethodManager
or null
.
An interface for creating a native payment method button.Show INativePaymentMethodManager
createPaymentMethodManager(
type: PaymentMethodType,
): Promise<IRedirectPaymentMethodManager | null>
IRedirectPaymentMethodManager
, which can be used to manage redirect-based payment
methods.
Hide Parameters
Hide Promise<IRedirectPaymentMethodManager | null>
createPaymentMethodManager(
type: "KLARNA",
options?: KlarnaPaymentMethodManagerOptions
): Promise<IKlarnaPaymentMethodManager | null>
IKlarnaPaymentMethodManager
, which can be used to manage Klarna specific payment methods which also require an extra form and user interaction.
Hide Parameters
Hide Properties
Hide Promise<IKlarnaPaymentMethodManager | null>
IKlarnaPaymentMethodManager
or null
.Show IKlarnaPaymentMethodManager
createPaymentMethodManager(
type: "STRIPE_ACH",
options?: AchPaymentMethodManagerOptions
): Promise<IAchPaymentMethodManager | null>
IAchPaymentMethodManager
, which can be used to manage ACH payment methods which also require an extra form and the mandate confirmation.
Hide Parameters
Show Properties
STRIPE_ACH
payment method. The Publishable Key can be found in the Stripe Dashboard API keys.Hide Promise<IAchPaymentMethodManager | null>
IAchPaymentMethodManager
or null
.Show IAchPaymentMethodManager
STRIPE_ACH
, the required data T
is:interface StripeAchFormData {
firstName: string;
lastName: string;
emailAddress: string;
}
STRIPE_ACH
, displays the Stripe UI to collect the bank account details.Throws an error if the start
method didn’t run successfully or wasn’t called before.start
and collectBankAccountDetails
weren’t successfully called before.