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
Name | Type | Default | Required | Description |
---|---|---|---|---|
customerToken | string | null | required/optional | A customer token starting with "cus" e.g "cus_dspVPLR2VD1x6qCmLrQUTqO4". It is optional if you are providing us with a cardToken instead. |
cardToken | string | null | required/optional | A card token starting with "crd" e.g "crd_U0FBPmz5t2zjDjKaOGABlo6A". It is optional if you are providing us with a customerToken instead. |
cardType | string | null | required | Field "type" from Payments API response. |
cardExpMonth | string | null | required | Field "expiration_month" from Payments API response. |
cardExpYear | string | null | required | Field "expiration_year" from Payments API response. |
cardLastFour | string | null | required | Field "last_four" from Payments API response. |
cardHolderName | string | null | optional | Field "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.
Name | Type | Default | Required | Description |
---|---|---|---|---|
cvvInput | boolean | true | optional | If 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). |