Customer Identification Number by country (Customer ID)

Quick links

Argentina

ID number

Requires customer ID, either: DNI or CUIT

Ex: customer.merchantCustomerId=12345678 or customer.merchantCustomerId=20365526312

Brazil

ID Number

Requires customer ID, either: CPF or CNPJ

CPF

  • The CPF (Cadastro de Pessoas Físicas – Natural Persons Register) is a number attributed by the Brazilian revenue agency (Receita Federal ‐ Federal Revenue) to both Brazilians and foreigners who pay taxes or take part directly or indirectly in activities resulting in revenues.

  • The CPF has a format of 9-2 digits, separated by dots and hyphen “- “.

  • Examples of valid CPF numbers:

    • 123.456.789‐09

    • 284.763.786‐96

    • 804.654.341‐18

Please note that dots and hyphen must not be sent, otherwise it will be considered invalid.

The parameter where the CPF information must be sent is:

  • Credit card: customer.merchantCustomerId=12345678909

  • Paypal: customer.merchantCustomerId=12345678909

  • Boleto: customParameters[CUSTOM_CPF_NUMBER]=12345678909 and

    customer.merchantCustomerId=12345678909

  • Validating the CPF results in higher authorization rates, therefore it is recommended to validate on merchants billing page before submitting to allpago.

The following pseudocode can be used for validation:

Validation algorithm (CPF):

function ValidateCPF(cpf: int[11]) var v: int[2]

//Note: compute 1st verification digit.

v[1] := 10×cpf[1] + 9×cpf[2] + 8×cpf[3] v[1] += 7×cpf[4] + 6×cpf[5] + 5×cpf[6] v[1] += 4×cpf[7] + 3×cpf[8] + 2×cpf[9] v[1] := 11 ‐ v[1] mod 11 v[1] := 0 if v[1] ≥ 10

//Note: compute 2nd verification digit.

v[2] := 11×cpf[1] + 10×cpf[2] + 9×cpf[3] v[2] += 8×cpf[4] + 7×cpf[5] + 6×cpf[6] v[2] += 5×cpf[7] + 4×cpf[8] + 3×cpf[9] v[2] += 2×v[1] v[2] := 11 ‐ v[2] mod 11 v[2] := 0 if v[2] ≥ 10

//Note: True if verification digits are as expected. return v[1] = cpf[10] and v[2] = cpf[11]

CNPJ

  • The CNPJ (Cadastro Nacional da Pessoa Juridica – National Legal Person Register) is a unique Identification number attributed by the Brazilian revenue agency (Receita Federal). The registry is mandatory and entitles the entity to conclude contracts and legal proceedings. The CNPJ is stated on all receipts as well as packages of industrial products.

  • Example of a typical CNPJ number:

    • 03.847.655/0001-98

    • 74.880.010/0001-04

    • 58.520.485/0001-24

The parameter where the CNPJ information must be sent is:

  • Credit card: customer.merchantCustomerId=03847655000128

  • Paypal: customer.merchantCustomerId=03847655000128

  • Boleto: customParameters[CUSTOM_CPF_NUMBER]=03847655000128

  • Validating the CNPJ results in higher authorization rates, therefore it is recommended to validate on merchants billing page before submitting to allpago.

The following pseudocode can be used for validation:

Validation algorithm (CNPJ):

function ValidarCNPJ(cnpj: int[14]) ‐ bool var v: int[2]

//Note: Compute first verification digit. v[1] := 5×cnpj[1] + 4×cnpj[2] + 3×cnpj[3] + 2×cnpj[4] v[1] += 9×cnpj[5] + 8×cnpj[6] + 7×cnpj[7] + 6×cnpj[8] v[1] += 5×cnpj[9] + 4×cnpj[10] + 3×cnpj[11] + 2×cnpj[12] v[1] := 11 ‐ v[1] mod 11 v[1] := 0 if v[1] ≥ 10

//Note: Compute second verification digit. v[2] := 6×cnpj[1] + 5×cnpj[2] + 4×cnpj[3] + 3×cnpj[4] v[2] += 2×cnpj[5] + 9×cnpj[6] + 8×cnpj[7] + 7×cnpj[8] v[2] += 6×cnpj[9] + 5×cnpj[10] + 4×cnpj[11] + 3×cnpj[12] v[2] += 2×v[1] v[2] := 11 ‐ v[2] mod 11 v[2] := 0 if v[2] ≥ 10

// Note: True if verification digits are as expected. return v[1] = cnpj[13] and v[2] = cnpj[14]

Chile

ID number

Requires customer ID, in this case RUT

  • RUT: The Rol Único Tributario (Unique Tax Number) is the primary identification document for both Chileans and foreigners legally residing in the country. It is a 7- or 8-digit number plus a Check Digit attributed by the SII (Servicio de Impuestos Internos - Internal Revenue Service), it identifies individuals and entities that perform any economic activity and are therefore subject to taxation.

Ex: customer.merchantCustomerId=24794213 or customer.merchantCustomerId=354625490

Colombia

ID number

Requires customer ID, either: Cédula de Ciudadanía, Tarjeta de Identidad, Cédula de Extranjería, NIT or pasaporte.

  • Cédula de Ciudadanía: The Cédula de Ciudadanía (Citizenship Identification Card) is a number attributed by the National Civil Registry (Registraduría Nacional del Estado Civil) to all Colombian citizens aged 18 or older. In Colombia, this is the main identification document for citizens of legal age.

  • Tarjeta de Identidad: The Tarjeta de Identidad (Identity Card) is a number attributed by the National Civil Registry (Registraduría Nacional del Estado Civil) to all Colombian citizens aged 7 to 17. In Colombia, this is the main identification document for underage citizens.

  • Cédula de Extranjería: The Cédula de Extranjería (Foreigners Identification Card) is a number attributed by the Colombian Migration Agency (Migración Colombia) to all foreign citizens legally residing in Colombia. It is the main identification document for all foreign citizens.

  • NIT (Número de Identificación Tributaria – Tax Identification Number) is a number attributed by the DIAN (Dirección de Impuestos y Aduanas Nacionales – Direction of National Taxes and Customs) to all legal entities performing economical activities in Colombia deriving in revenue and, therefore, in its tax obligations before the local authorities.

  • Pasaporte: The Pasaporte (Passport), issued by the Colombian Ministry of Foreign Affairs, is the travel document used by Colombian citizens for the purpose of international identification.

Please collect any one of the five ID numbers above. Only digits that can go up to 10 with no punctuation.

Ex: customer.merchantCustomerId=1234567890

Mexico

ID number

ID number is not mandatory for Mexico transactions.

Peru

ID number

Requires customer ID, either: DNI, Cédula de Extranjería or RUC

  • DNI (Documento Nacional de Identidad): 8 numeric digits.

  • Cédula de Extranjería (Foreigner Identification Card): 9 numeric digits.

  • RUC: The Registro Único de Contribuyentes (Unique Tax Number) is a number attributed by the Peruvian Tax Authorities (SUNAT) to Peruvians and foreigners who pay taxes or take part directly or indirectly in activities resulting in revenue. It issued to identify both physical persons and legal entities, however in eCommerce it is used to identify B2B buyers. 11 numeric digits.

Note: For B2C products, collect the DNI (for Peruvian citizen) or the Cédula de Extranjería (for foreigners). For B2B products, please collect the RUC. These need to be sent in the parameter: customer.merchantCustomerId.

Ex:

DNI: customer.merchantCustomerId=12345678

Cédula de Extranjería: customer.merchantCustomerId=001112311

RUC: customer.merchantCustomerId=17278796167