kamiPay LogokamiPay Docs

Pix Key Validation

Verify the owner of a Pix key before making a payment

Before sending money with our payment solution, it's important to ensure you are paying to the right person and no mistake is made with Pix Keys.

Pix Keys refer to the alias or ID used by Pix to route the payment to the appropriate bank account. Pix Keys can be of different forms:

  • CPF or CNPJ: local personal or company IDs (use only numbers without special symbols)
  • Email address
  • Phone number (include with country code, +55)
  • Random key (alphanumeric)

With this endpoint, passing the pix key you will receive the name of the bank account owner for verification.

Query Parameters

NameTypeDescription
pix_keystringRequired. The Pix key to validate (CPF/CNPJ, email, phone, or random key)

Validating a Pix key before making a payment helps ensure that funds are sent to the intended recipient and reduces the risk of errors.

Example Request

const pixKey = "mati@kamipay.io";
 
const url = `${baseURL}/v1/payments/pixKeyValidation?pix_key=${pixKey}`;
 
const response = await fetch(url, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${access_token}`,
    "Content-Type": "application/json",
  },
});

Response

{
  "msg": "valid pix_key",
  "reformated_key": "mati@kamipay.io",
  "name": "PAULO SERGIO"
}

Response Fields

FieldDescription
msgStatus message indicating if the Pix key is valid
reformated_keyThe validated and potentially reformatted Pix key
nameThe name of the bank account owner associated with the Pix key

On this page