Below you will find the validation rules we use for the input data.

Credit Cards

Credit card scheme

payment.payment_type_code

The credit card scheme can be detected by using the following regular expressions:

  • American Express: ^3[47][0-9]{13}$
  • Aura: ^5[0-9]{18}$
  • Elo: ^((50670[7-8])|(506715)|(50671[7-9])|(50672[0-1])|(50672[4-9])|(50673[0-3])|(506739)|(50674[0-8])|(50675[0-3])|(50677[4-8])|(50900[0-9])|(50901[3-9])|(50902[0-9])|(50903[1-9])|(50904[0-9])|(50905[0-9])|(50906[0-4])|(50906[6-9])|(50907[0-2])|(50907[4-5])|(636368)|(636297)|(504175)|(438935)|(40117[8-9])|(45763[1-2])|(457393)|(431274)|(50907[6-9])|(50908[0-9])|(627780))
  • Diners: ^(36[0-9]{12}|3(?:0[0-5]|[68][0-9])[0-9]{11})$
  • Discover: ^6(?:011|5[0-9]{2})[0-9]{12}$
  • Hipercard: ^((606282|637095|637568)[0-9]{10}|38[0-9]{14,17})$
  • Mastercard: ^5[0-5][0-9]{14}$|2[2-6][0-9]{14}$|271[0-9]{13}$|2720[0-9]{12}
  • Visa: ^4[0-9]{15}$

Credit card number

payment.creditcard.card_number

Credit card cardholder name

payment.creditcard.card_name

Length between 2 and 26 digits

Credit card due date

payment.creditcard.card_due_date

Date in the format MM/YYYY (eg.: 10/2019)

Credit card security code (CVV)

payment.creditcard.card_cvv

Length between 3 and 4 digits.

Customer data

For payments in Brazil

Taxpayer ID (CPF)

payment.document

Birth date

payment.birth_date

Date in the format DD/MM/YYYY (eg: 01/02/1983)

State

payment.state

Zipcode

payment.document

Length must be 8 digits, format may be XXXXX-XXX or XXXXXXXX

Phone number

payment.phone_number

Length must be between 8 and 15 digits