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
     email: 'jdoe@email.com', //required/optional
     phone: '+306900000001', //required/optional
   },
   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.
emailstringnullrequired/optionalEmail is required when phone is not given. If both email and phone are missing, a required phone input will be displayed.
phonestringnullrequired/optionalPhone is required when email is not given. The suggested format is '+306901234567'. If both email and phone are missing, a required phone input will be displayed.

Display tokenization Parameters

When phone or email information is missing from the tokenized data, a required phone input field will be displayed. Additionally, the options {button: false} and hidden: true will not be set.

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).
buttonboolTRUEoptionalIf set to false it will hide the button within the Payform.