Skip to main content

Create Pix Key

Create Pix Key CPF, CNPJ or Random

Request

  • MÉTODO
    POST
  • ENDPOINT
    /baas/pix/keys
Request Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"pix_key_type": "random_key"
}
Request Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"pix_key_type": "cnpj",
"pix_key": "09080702000105"
}
Request Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"pix_key_type": "cpf",
"pix_key": "03882617038"
}
Types of Pix Key

The “pix_key” can be a CPF, CNPJ, Email, Mobile Number, or a Random Key (UUID), following these formats: CPF: Integer number with 11 digits. CNPJ: Integer number with 14 digits. Email: Text containing at least one “@”. Mobile Number: Text containing the following values: “+55” + “Cell Phone Area Code“ + “Cell Phone Number with a minimum of 8 and a maximum of 9 digits”. Example: “+5511987654321“. Random Key: UUID.

Response

  • MÉTODO
    POST
  • ENDPOINT
    /baas/pix/keys
Response Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T18:20:52",
"pix_key": {
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T18:20:51",
"pix_key": "09080702000105",
"pix_key_status": "pending_confirmation",
"pix_key_type": "cnpj",
"updated_at": "2022-09-02T18:20:51"
},
"pix_key_request_key": "d60abf67-ad9c-42ee-9089-d26c8fc855b9",
"request_data": {
"account_created_at": "2022-09-02T22:44:36",
"account_digit": "2",
"account_number": "2359934",
"account_type": "checking",
"branch_number": "0001",
"key": "09080702000105",
"owner_document_number": "09080702000105",
"owner_name": "VOVO LUCIA CONVENIENCIA LTDA",
"owner_person_type": "legal",
"trading_name": "VOVO LUCIA"
},
"request_failure_reason": null,
"request_status": "pending",
"request_type": "inclusion",
"requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
"updated_at": "2022-09-02T18:20:52"
}

STATUS
400

Response Body: Pix Key already exists.
{
"title": "Bad Request",
"description": "Pix key: \{pix_key\} already exists.",
"translation": "A chave pix: \{pix_key\} já existe.",
"code": "PIX000065"
}

STATUS
404

Response Body: Account not found
{
"title": "Account not found",
"description": "Conta não encontrada para account_key: \{account_key\}",
"translation": "Conta não encontrada para account_key: \{account_key\}",
"code": "PIX000026"
}

STATUS
400

Response Body: Person not found
{
"title": "Person not found",
"description": "Pessoa não encontrada para person_key: \{person_key\}",
"translation": "Pessoa não encontrada para person_key: \{person_key\}",
"code": "PIX000027"
}

STATUS
400

Response Body: Pix Key Creation Non Finished
{
"title": "Pix Key Creation Non Finished",
"description": "A chave pix \{pix_key\} já possui um pedido de criação não finalizado.",
"translation": "A chave pix \{pix_key\} já possui um pedido de criação não finalizado.",
"code": "PIX000074"
}

STATUS
400

Response Body: Maximum Number of Pix Keys in Use
{
"title": "Maximum Number of Pix Keys in Use",
"description": "A conta \{account_key\} já atingiu o número máximo de chaves pix.",
"translation": "A conta \{account_key\} já atingiu o número máximo de chaves pix.",
"code": "PIX000014"
}

STATUS
400

Response Body: Account is not Opened
{
"title": "Account is not Opened",
"description": "A conta \{account_key\} não está aberta.",
"translation": "A conta \{account_key\} não está aberta.",
"code": "PIX000002"
}

STATUS
403

Response Body: Invalid Permission
{
"title": "Invalid Permission",
"description": "A pessoa \{person_key\} não possui credenciais de administrador para a conta \{account_key\}.",
"translation": "A pessoa \{person_key\} não possui credenciais de administrador para a conta \{account_key\}.",
"code": "PIX000054"
}

STATUS
422

Response Body: Attempted CPF Pix Key is Not that of Account Owner
{
"title": "Attempted CPF Pix Key is Not that of Account Owner",
"description": "A chave pix fornecida \{pix_key\} não corresponde ao CPF {document_number} do titular da conta.",
"translation": "A chave pix fornecida \{pix_key\} não corresponde ao CPF {document_number} do titular da conta.",
"code": "PIX000020"
}
Attention

In the case of the Response for the creation of a Random Pix Key, the field “pix_key” will return a null value. To retrieve the value of the generated random key, it is necessary to perform a query to the list of keys registered in an account or through the activation webhook.

Attention

The creation of keys is asynchronous, so the key will only be available for use after receiving the pix key inclusion webhook.

Create Pix Key for Email and Mobile

To create the key: POST to the endpoint “/baas/pix/keys”. At this moment, a token will be sent to the Email or Mobile number provided in the “pix_key” field.

Request

  • MÉTODO
    POST
  • ENDPOINT
    /baas/pix/keys
Request Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"pix_key_type": "email",
"pix_key": "vovo.lucia@gmail.com.br"
}
Request Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"pix_key_type": "phone_number",
"pix_key": "+5511987654321"
}

Response

  • MÉTODO
    POST
  • ENDPOINT
    /baas/pix/keys
Response Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:55",
"pix_key": {
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:54",
"pix_key": "pedro.pinho@qitech.com.br",
"pix_key_status": "pending_confirmation",
"pix_key_type": "email",
"updated_at": "2022-09-02T17:41:54"
},
"pix_key_request_key": "f6209b7e-82da-44a8-9cfa-6ad0a689adb2",
"request_data": {
"account_created_at": "2022-09-02T22:44:36",
"account_digit": "2",
"account_number": "2359934",
"account_type": "checking",
"branch_number": "0001",
"key": "pedro.pinho@qitech.com.br",
"owner_document_number": "09080702000105",
"owner_name": "VOVO LUCIA CONVENIENCIA LTDA",
"owner_person_type": "legal",
"trading_name": "VOVO LUCIA"
},
"request_failure_reason": null,
"request_status": "pending_validation",
"request_type": "inclusion",
"requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
"updated_at": "2022-09-02T17:41:55"
}

STATUS
400

Response Body: Already exists.
{
"title": "Bad Request",
"description": "Pix key: \{pix_key\} already exists.",
"translation": "A chave pix: \{pix_key\} já existe.",
"code": "PIX000065"
}

STATUS
404

Response Body: Account not found
{
"title": "Account not found",
"description": "Conta não encontrada para account_key: \{account_key\}",
"translation": "Conta não encontrada para account_key: \{account_key\}",
"code": "PIX000026"
}

STATUS
400

Response Body: Person not found
{
"title": "Person not found",
"description": "Pessoa não encontrada para person_key: \{person_key\}",
"translation": "Pessoa não encontrada para person_key: \{person_key\}",
"code": "PIX000027"
}

STATUS
400

Response Body: Pix Key Creation Non Finished
{
"title": "Pix Key Creation Non Finished",
"description": "A chave pix \{pix_key\} já possui um pedido de criação não finalizado.",
"translation": "A chave pix \{pix_key\} já possui um pedido de criação não finalizado.",
"code": "PIX000074"
}

STATUS
400

Response Body: Maximum Number of Pix Keys in Use
{
"title": "Maximum Number of Pix Keys in Use",
"description": "A conta \{account_key\} já atingiu o número máximo de chaves pix.",
"translation": "A conta \{account_key\} já atingiu o número máximo de chaves pix.",
"code": "PIX000014"
}

STATUS
400

Response Body: Account is not Opened
{
"title": "Account is not Opened",
"description": "A conta \{account_key\} não está aberta.",
"translation": "A conta \{account_key\} não está aberta.",
"code": "PIX000002"
}

STATUS
403

Response Body: Invalid Permission
{
"title": "Invalid Permission",
"description": "A pessoa \{person_key\} não possui credenciais de administrador para a conta \{account_key\}.",
"translation": "A pessoa \{person_key\} não possui credenciais de administrador para a conta \{account_key\}.",
"code": "PIX000054"
}

STATUS
422

Response Body: Attempted CPF Pix Key is Not that of Account Owner
{
"title": "Attempted CPF Pix Key is Not that of Account Owner",
"description": "A chave pix fornecida \{pix_key\} não corresponde ao CPF {document_number} do titular da conta.",
"translation": "A chave pix fornecida \{pix_key\} não corresponde ao CPF {document_number} do titular da conta.",
"code": "PIX000020"
}

IMPORTANT: The value returned in the “pix_key_request_key” field must be used in the URL of the request to approve the creation of the Pix Key.

Approval of Pix Key for Email or Mobile

Request

  • METHOD
    PATCH
  • ENDPOINT
    /baas/pix/keys/PIX_KEY_REQUEST_KEY/twofa_validation
Request Body
{
"verification_code": "756816"
}

Response

Response Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:55",
"pix_key": {
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:54",
"pix_key": "pedro.pinho@qitech.com.br",
"pix_key_status": "pending_confirmation",
"pix_key_type": "email",
"updated_at": "2022-09-02T17:41:54"
},
"pix_key_request_key": "f6209b7e-82da-44a8-9cfa-6ad0a689adb2",
"request_data": {
"account_created_at": "2022-09-02T22:44:36",
"account_digit": "2",
"account_number": "2359934",
"account_type": "checking",
"branch_number": "0001",
"key": "pedro.pinho@qitech.com.br",
"owner_document_number": "09080702000105",
"owner_name": "VOVO LUCIA CONVENIENCIA LTDA",
"owner_person_type": "legal",
"trading_name": "VOVO LUCIA"
},
"request_failure_reason": null,
"request_status": "pending",
"request_type": "inclusion",
"requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
"updated_at": "2022-09-02T17:41:55"
}

STATUS
404

Response Body: Pix Key Request not found
{
"title": "Pix Key Request not found",
"description": "Pix Key Request not found for key: {pix_key_request_key}.",
"translation": "Pix Key Request não encontrada para a chave: {pix_key_request_key}.",
"code": "PIX000008"
}

STATUS
403

Response Body: Permission Validator Error
{
"title": "Permission Validator Error",
"description": "Selected agent do not own this item.",
"translation": "O agente selecionado não é dono do item.",
"code": "QIT000005"
}

STATUS
400

Response Body: Key request does not have validation
{
"title": "Key request does not have validation",
"description": "Key request does not have two steps validation",
"translation": "Pedido de criação não possui validação de duas etapas",
"code": "PIX000075"
}

STATUS
400

Response Body: Key Request Is Not Pending Validation
{
"title": "Key Request Is Not Pending Validation",
"description": "Key request {pix_key_request_key}, is not pending validation.",
"translation": "Pedido de criação {pix_key_request_key}, não está pendente de validação.",
"code": "PIX000076"
}

STATUS
404

Response Body: Expired Token Code
{
"title": "Gone",
"description": {
"description": "Expired Code.",
"translation": "Código de verificação expirado."
},
"translation": {},
"extra_fields": {},
"code": "2FA000410"
}

STATUS
403

Response Body: Token already verified
{
"title": "Forbidden",
"description": {
"description": "Code already verified.",
"translation": "Este código já foi utilizado."
},
"translation": {},
"extra_fields": {},
"code": "2FA000403"
}

Resend the approval token

Request

  • METHOD
    PATCH
  • ENDPOINT
    /baas/pix/keys/PIX_KEY_REQUEST_KEY/resend_twofa
Request Body
{}

Response

Response Body
{
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:55",
"pix_key": {
"account_key": "6d30a0b1-cb90-4ceb-b1ea-5bd600cdf3c8",
"created_at": "2022-09-02T17:41:54",
"pix_key": "pedro.pinho@qitech.com.br",
"pix_key_status": "pending_confirmation",
"pix_key_type": "email",
"updated_at": "2022-09-02T17:41:54"
},
"pix_key_request_key": "f6209b7e-82da-44a8-9cfa-6ad0a689adb2",
"request_data": {
"account_created_at": "2022-09-02T22:44:36",
"account_digit": "2",
"account_number": "2359934",
"account_type": "checking",
"branch_number": "0001",
"key": "pedro.pinho@qitech.com.br",
"owner_document_number": "09080702000105",
"owner_name": "VOVO LUCIA CONVENIENCIA LTDA",
"owner_person_type": "legal",
"trading_name": "VOVO LUCIA"
},
"request_failure_reason": null,
"request_status": "pending_validation",
"request_type": "inclusion",
"requester_key": "ef48fbe4-267b-45c1-9049-75345c075486",
"updated_at": "2022-09-02T17:41:55"
}

STATUS
404

Response Body: Pix Key Request not found
{
"title": "Pix Key Request not found",
"description": "Pix Key Request not found for key: {pix_key_request_key}.",
"translation": "Pix Key Request não encontrada para a chave: {pix_key_request_key}.",
"code": "PIX000008"
}

STATUS
403

Response Body: Permission Validator Error
{
"title": "Permission Validator Error",
"description": "Selected agent do not own this item.",
"translation": "O agente selecionado não é dono do item.",
"code": "QIT000005"
}

STATUS
400

Response Body: Key request does not have validation
{
"title": "Key request does not have validation",
"description": "Key request does not have two steps validation",
"translation": "Pedido de criação não possui validação de duas etapas",
"code": "PIX000075"
}

STATUS
400

Response Body: Key Request Is Not Pending Validation
{
"title": "Key Request Is Not Pending Validation",
"description": "Key request {pix_key_request_key}, is not pending validation.",
"translation": "Pedido de criação {pix_key_request_key}, não está pendente de validação.",
"code": "PIX000076"
}

Pix Key Inclusion Webhook

WEBHOOK_TYPE
key_inclusion
STATUS
approved
Webhook Body
{
"pix_key": "c232142c-ddbf-41d6-a54f-3b90c28b97dc",
"account_key": "94945886-7a6f-43e6-a307-e36c959e4903",
"webhook_type": "key_inclusion",
"pix_key_status": "active",
"pix_key_request_key": "e274eb13-40b3-4902-978e-8e5fa267af53",
"pix_key_request_type": "inclusion",
"pix_key_request_status": "approved"
}