Tokenization Parameters

Important: In order to initiate a Tokenized Payment you either need to provide us with a Customer Token (a token started with 'cus') or a Card Token. One of them is required. Other than that all the other parameters are required. If you don't have any of the fields in your database you have to go with a new card payment.

Example

var payload = {
    ...,
   data: {
     customerToken: 'cus_dspVPLR2VD1x6qCmLrQUTqO4', //required field
     cardType: 'visa', //required field
     cardExpMonth: '01', //required field
     cardExpYear: '2021', //required field
     cardLastFour: '9395', //required field
     cardHolderName: 'John Doe', //optional field
   },
   display: {
     cvvInput: true/false //optional field
   }
}

Data tokenization Parameters

NameTypeDefaultRequiredDescription
customerTokenstringnullrequired/optionalA customer token starting with "cus" e.g "cus_dspVPLR2VD1x6qCmLrQUTqO4". It is optional if you are providing us with a cardToken instead.
cardTokenstringnullrequired/optionalA card token starting with "crd" e.g "crd_U0FBPmz5t2zjDjKaOGABlo6A". It is optional if you are providing us with a customerToken instead.
cardTypestringnullrequiredField "type" from Payments API response.
cardExpMonthstringnullrequiredField "expiration_month" from Payments API response.
cardExpYearstringnullrequiredField "expiration_year" from Payments API response.
cardLastFourstringnullrequiredField "last_four" from Payments API response.
cardHolderNamestringnulloptionalField "holder_name" from Payments API response.

Display tokenization Parameters

Important: even if the form is auto-submited once you initialize everypay.tokenized() make sure that it has some space within your implementation in order to display any error messages.

NameTypeDefaultRequiredDescription
cvvInputbooleantrueoptionalIf false it hides the CVV input and auto-submits the form (*if there are no other fields present in the form like installments or billing, highly depends on your implementation).