React Native SDK
- Installation
- Primer
- PrimerHeadlessCheckout
- Common objects
PrimerPaymentMethodTokenData
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
An unique identifier for the payment instrument token.
Payment method identifier.
Indicating the use of vaulted instruments for the payment method.
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
The human readable representation of card network (e.g., Visa, Mastercard).
The name of the cardholder.
The first 6 digits of the card number.
The last 4 digits of the card number.
The last 4 digits of the account number.
The expiration month of the card, in 2-digit format.
The expiration year of the card, in 4-digit format.
A unique string identifier for the payment method. (e.g. PAYPAL
, GOOGLE_PAY
)
Additional BIN data.
Hide Properties
Hide Properties
The card network (e.g., VISA, MASTERCARD, AMEX).
The name of the bank.
The type of the payment instrument.
Example of possible values (new values could be added as we add new payment methods):
APPLE_PAY
CARD_OFF_SESSION_PAYMENT
GOOGLE_PAY
KLARNA_CUSTOMER_TOKEN
OFF_SESSION_PAYMENT
PAYMENT_CARD
PAYPAL_BILLING_AGREEMENT
PAYPAL_ORDER
The payment instrument token you can use to create a payment request from your backend.
Whether this payment method token can be used only once or multiple times.
Show Properties
Show Properties
Indicates the outcome of the 3D Secure authentication process.
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.
An optional code indicating the reason for the outcome of the 3D Secure authentication.
An optional text description providing further details about the reason for the authentication outcome.
Specifies the version of the 3D Secure protocol that was used.
Indicates whether a challenge was issued as part of the authentication process.
true
: A challenge was issued.false
: No challenge was issued.