> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# PrimerPaymentMethodTokenData

```ts theme={"dark"}
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;
  /** @deprecated Use firstDigits instead. */
  first6Digits?: number;
  firstDigits?: 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;
}
```

**Properties**

**analyticsId** `string`

An unique identifier for the payment instrument token.

**id** `string`

Payment method identifier.

**isVaulted** `boolean`

Indicating the use of vaulted instruments for the payment method.

**paymentInstrumentData** `PaymentInstrumentData`

Additional information about the payment instrument.
Depending on the payment method type, only some of the following properties are present on the object.

**Properties**

**network** `string?`

The human readable representation of card network (e.g., Visa, Mastercard).

**cardholderName** `string?`

The name of the cardholder.

**first6Digits** `number?`

The first 6 digits of the card number.

**firstDigits** `number?`

The first 6 or 8 digits of the card number within PCI guidelines.

**last4Digits** `number?`

The last 4 digits of the card number.

**accountNumberLast4Digits** `number?`

The last 4 digits of the account number.

**expirationMonth** `number?`

The expiration month of the card, in 2-digit format.

**expirationYear** `number?`

The expiration year of the card, in 4-digit format.

**externalPayerInfo** `IExternalPayerInfo?`

Additional PayPal data.

**Properties**

**email** `string`

The payer's email address.

**externalPayerId** `string?`

The payer's unique ID.

**firstName** `string?`

The payer's given name.

**lastName** `string`

The payer's given surname.

**klarnaCustomerToken** `string?`

**sessionData** `IKlarnaSessionData?`

**paymentMethodType** `string?`

A unique string identifier for the payment method. (e.g. `PAYPAL`, `GOOGLE_PAY`)

**binData** `IBinData?`

Additional BIN data.

**Properties**

**network** `string?`

The card network (e.g., VISA, MASTERCARD, AMEX).

**bankName** `string?`

The name of the bank.

**paymentInstrumentType** `string`

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`

**token** `string` *required*

The payment instrument token you can use to [create a payment request](https://primer.io/docs/api-reference/v2.4/api-reference/payments-api/create-a-payment.md) from your backend.

**tokenType** `"SINGLE_USE" | "MULTI_USE"`

Whether this payment method token can be used only once or multiple times.

**threeDSecureAuthentication** `ThreeDSAuthenticationData`

**Properties**

**responseCode** `ThreeDSecureStatus`

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.

**reasonCode** `string`

An optional code indicating the reason for the outcome of the 3D Secure authentication.

**reasonText** `string`

An optional text description providing further details about the reason for the authentication outcome.

**protocolVersion** `string`

Specifies the version of the 3D Secure protocol that was used.

**challengeIssued** `boolean`

Indicates whether a challenge was issued as part of the authentication process.

* `true`: A challenge was issued.
* `false`: No challenge was issued.

**vaultData** `PrimerVaultData`

**Properties**

**customerId** `string`

The `customerId` associated to the payment method, if vaulted.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.