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
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. |
string | null | required/optional | Email is required when phone is not given. If both email and phone are missing, a required phone input will be displayed. | |
phone | string | null | required/optional | Phone 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.
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). |
button | bool | TRUE | optional | If set to false it will hide the button within the Payform. |