customer.merchantCustomerId=20365526312
customer.merchantCustomerId=12345678909
customer.merchantCustomerId=12345678909
customParameters[CUSTOM_CPF_NUMBER]=12345678909 and
customer.merchantCustomerId=12345678909
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]
customer.merchantCustomerId=03847655000128
customer.merchantCustomerId=03847655000128
customParameters[CUSTOM_CPF_NUMBER]=03847655000128
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]
customer.merchantCustomerId=24794213
or customer.merchantCustomerId=354625490
customer.merchantCustomerId=1234567890
customer.merchantCustomerId=12345678
customer.merchantCustomerId=001112311
customer.merchantCustomerId=17278796167