interface PrimerPaymentMethodTokenData {
analyticsId?: string;
id?: string;
isVaulted?: boolean;
paymentInstrumentData: PrimerPaymentInstrumentData;
paymentInstrumentType: string;
token: string;
tokenType?: PrimerTokenType;
threeDSecureAuthentication?: PrimerThreeDSAuthenticationData;
vaultData?: PrimerVaultData;
}
enum PrimerTokenType {
SINGLE_USE = "SINGLE_USE",
MULTI_USE = "MULTI_USE",
}
interface PrimerThreeDSAuthenticationData {
challengeIssued?: boolean;
protocolVersion?: string;
reasonCode?: string;
reasonText?: string;
responseCode?: string;
}
interface PrimerVaultData {
customerId?: string;
}
export interface IPrimerPaymentInstrumentData {
network?: string;
cardholderName?: string;
first6Digits?: number;
last4Digits?: number;
accountNumberLast4Digits?: number;
expirationMonth?: number;
expirationYear?: number;
externalPayerInfo?: IExternalPayerInfo;
klarnaCustomerToken?: string;
sessionData?: IKlarnaSessionData;
paymentMethodType?: string;
binData?: IBinData;
bankName?: string;
}
export interface IKlarnaSessionData {
recurringDescription?: string;
billingAddress?: IKlarnaBillingAddress;
}
export interface IKlarnaBillingAddress {
email?: string;
}
interface ExternalPayerInfo {
email: string;
externalPayerId?: string;
firstName?: string;
lastName?: string;
}
interface ShippingAddress {
firstName?: string;
lastName?: string;
addressLine1?: string;
addressLine2?: string;
city?: string;
state?: string;
countryCode?: string;
postalCode?: string;
}
interface BinData {
network?: string;
issuerCountryCode?: string;
issuerName?: string;
issuerCurrencyCode?: string;
regionalRestriction?: string;
accountNumberType?: string;
accountFundingType?: string;
prepaidReloadableIndicator?: string;
productUsageType?: string;
productCode?: string;
productName?: string;
}
Hide Properties
Hide Properties
string
An unique identifier for the payment instrument token.
string
Payment method identifier.
boolean
Indicating the use of vaulted instruments for the payment method.
PaymentInstrumentData
Additional information about the payment instrument.
Depending on the payment method type, only some of the following properties are present on the object.
Show Properties
Show Properties
string?
The human readable representation of card network (e.g., Visa, Mastercard).
string?
The name of the cardholder.
number?
The first 6 digits of the card number.
number?
The last 4 digits of the card number.
number?
The last 4 digits of the account number.
number?
The expiration month of the card, in 2-digit format.
number?
The expiration year of the card, in 4-digit format.
IExternalPayerInfo?
string?
IKlarnaSessionData?
string?
A unique string identifier for the payment method. (e.g.
PAYPAL, GOOGLE_PAY)IBinData?
Additional BIN data.
Hide Properties
Hide Properties
string?
The card network (e.g., VISA, MASTERCARD, AMEX).
string?
The name of the bank.
string
The type of the payment instrument.Example of possible values (new values could be added as we add new payment methods):
APPLE_PAYCARD_OFF_SESSION_PAYMENTGOOGLE_PAYKLARNA_CUSTOMER_TOKENOFF_SESSION_PAYMENTPAYMENT_CARDPAYPAL_BILLING_AGREEMENTPAYPAL_ORDER
string
required
The payment instrument token you can use to create a payment request from your backend.
"SINGLE_USE" | "MULTI_USE"
Whether this payment method token can be used only once or multiple times.
ThreeDSAuthenticationData
Show Properties
Show Properties
ThreeDSecureStatus
Indicates the outcome of the 3D Secure authentication process.
Possible values:
Possible values:
AUTH_SUCCESS: The authentication was successful.AUTH_FAILED: The authentication process failed.SKIPPED: The authentication was skipped.CHALLENGE: A challenge was issued during the authentication process.
string
An optional code indicating the reason for the outcome of the 3D Secure authentication.
string
An optional text description providing further details about the reason for the authentication outcome.
string
Specifies the version of the 3D Secure protocol that was used.
boolean
Indicates whether a challenge was issued as part of the authentication process.
true: A challenge was issued.false: No challenge was issued.