Skip to main content

Create Payment Token

POST 

/payment-tokens

Tokenizes payment details for use in subsequent transactions. The same payment method can be tokenized a few times.

Request

Body

required

An object containing payment method details

    processingEntityId uuidrequired

    Processing entityId provided by Nuvei.

    Example: 80aef199-b89a-4d59-ba0c-f2cd3c25d5cd
    merchantReference Merchant Reference for Payment Token (string)

    Merchant Reference for a business entity (token, subscription, etc.)

    Possible values: <= 50 characters

    Example: MREF_6f06168d-ff6e-448b-8401-30051eb6b1af

    paymentOption

    object

    required

    card

    object

    cardHolderName CardHolderName (string)

    The cardholder name.

    Possible values: <= 70 characters

    Example: Jada Pinkett
    cardNumber passwordrequired

    The full credit card number.

    Possible values: non-empty and <= 20 characters

    Example: 5113981660016597
    expirationMonth Card Expiration - Month (string)required

    The card expiration month.

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^(0[1-9]|1[0-2])$

    Example: 06
    expirationYear Card Expiration - Year (string)required

    The card expiration year.

    Possible values: >= 2 characters and <= 4 characters, Value must match regular expression ^(\d{4}|\d{2})$

    Example: 2022
    cvv password

    The CVV/CVC security code.

    Possible values: <= 4 characters

    Example: 591

    alternativePaymentMethod

    object

    name string

    Possible values: non-empty and <= 50 characters

    Example: ACH

    data

    object

    property name* password

    temporaryPaymentToken

    object

    paymentTokenId Payment Token ID (string)required
    Example: 1eaf1356-a9a2-4a16-a0c1-290ba2265257
    buyerId BuyerId (string)

    Possible values: <= 255 characters

    usageIntent declared MIT usage for the payment token (string)

    Possible values: [recurring, unscheduled]

    custom object
    Example: {"hello":"world"}

Responses

OK

Schema

    paymentToken

    object

    paymentTokenId Payment Token ID (string)required
    Example: 1eaf1356-a9a2-4a16-a0c1-290ba2265257
    cccId Credit Card Company ID (integer)

    ID of card in the Gateway. Values: 1 = VISA | 2 = MasterCard | 3 = Amex | 4 = Diners | 5 = JCB | 6 = Discover

    Example: 1

    paymentOption

    object

    required

    card

    object

    cardHolderName CardHolderName (string)

    The cardholder name.

    Possible values: <= 70 characters

    Example: Jada Pinkett
    maskedCardNumber CardNumberMasked (string)

    The masked credit card number.

    Possible values: <= 20 characters

    Example: 5***6597
    bin CardBIN (string)

    The first six or eight digits from the credit card number for identifying the processing bank. The rest of the number is not displayed.

    Possible values: <= 8 characters

    Example: 546221
    expirationMonth Card Expiration - Month (string)required

    The card expiration month.

    Possible values: >= 2 characters and <= 2 characters, Value must match regular expression ^(0[1-9]|1[0-2])$

    Example: 06
    expirationYear Card Expiration - Year (string)required

    The card expiration year.

    Possible values: >= 2 characters and <= 4 characters, Value must match regular expression ^(\d{4}|\d{2})$

    Example: 2022
    cardType CardType (string)

    The type of card used in the transaction.

    Possible values: [Credit, Debit]

    cardBrand CardBrand (string)

    The card brand used in the transaction.

    Possible values: [VISA, MASTERCARD, AMEX, DINERS]

    cardProduct string
    cardProgram string
    cardProductType string
    isPrepaid boolean

    Indicates if the card is prepaid or not.

    issuingCountry Country Code (string)

    Possible values: >= 2 characters and <= 2 characters

    Example: DE
    isVirtual boolean
    isDynamicCurrencyConversionSupported boolean

    alternativePaymentMethod

    object

    name string

    Possible values: non-empty and <= 50 characters

    Example: ACH

    data

    object

    property name* password

    result

    object

    required

    status stringrequired

    Possible values: [success, error]

    errors

    object

    code string

    If an error occurred on the request side, an error code is returned in this parameter.

    Possible values: <= 11 characters

    Example: 7000.1000
    reason string

    If an error occurred on the request side, then an error reason is returned in this parameter.

    Possible values: <= 400 characters

    Example: Unexpected error
Loading...