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: ^50[0-9]{14,17}$
  • Elo: ^(636368|438935|504175|451416|636297|5067|4576|4011|50904|50905|50906)
  • Diners: ^3(?:0[0-5]|[68][0-9])[0-9]{11}$
  • Discover: ^6(?:011|5[0-9]{2})[0-9]{12}$
  • Hipercard: ^(38|60)[0-9]{11,17}$
  • Mastercard: ^5[1-5][0-9]{14}$
  • Visa: ^4[0-9]{12}(?:[0-9]{3})?$

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