Skip to main content
POST
Create a new PIX key

Authorizations

x-api-key
string
header
required

Company API key for authentication

Body

application/json
provider
enum<string>
required

The provider name (accepts lowercase and uppercase, returns uppercase). Only CELCOIN offers Pix. RINNE and CAPPTA are left out of this enum: sent anyway, they are refused with 404 or 400 before anything is written.

Available options:
CELCOIN
Minimum string length: 1
Example:

"CELCOIN"

key_type
enum<string>
required

The Pix key type (accepts lowercase and uppercase, returns uppercase):

  • CPF: the account holder's CPF; registered right away
  • CNPJ: the account holder's CNPJ; registered right away
  • EMAIL: an email address; registered once its holder confirms the code sent to it
  • PHONE: a phone number; registered once its holder confirms the code sent to it by SMS
  • EVP: a random key generated by the provider; registered right away
Available options:
CPF,
CNPJ,
EMAIL,
PHONE,
EVP
Example:

"EMAIL"

key
string

The key value. Required for every key_type but EVP, for which it must be absent: the provider assigns it.

  • CPF: 11 digits with valid check digits, the account holder's own document
  • CNPJ: 14 characters, digits or letters, with valid check digits, the account holder's own document
  • EMAIL: a valid email address
  • PHONE: + followed by 10 to 14 digits, country code included (+5511999990000)

A CPF or CNPJ is stored without punctuation and with its letters uppercased, so 12.ABC.345/01DE-35 is stored and returned as 12ABC34501DE35.

Minimum string length: 1
primary
boolean
default:false

Whether the key becomes the primary Pix key, the one a charge settles to when it names no pix_key_id. Applied only when this call answers the key ACTIVE. Ignored for EMAIL and PHONE keys, which are created PENDING_VERIFICATION: send it on verify instead.

Example:

false

Response

Pix key created successfully

A Pix key registered, or being registered, on the account

id
string<uuid>
required

Pix key unique identifier

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2793"

affiliation_id
string<uuid>
required

Affiliation ID associated with this PIX key

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2794"

company_id
string<uuid>
required

Company ID that owns this PIX key

Example:

"a3dbd0c2-9f79-4f86-8caa-47779b3f2795"

key_type
enum<string>
required

The Pix key type

Available options:
CPF,
CNPJ,
EMAIL,
PHONE,
EVP
Example:

"EMAIL"

key
string | null
required

The Pix key value. null for an EVP key until the provider assigns it; a CPF or CNPJ without punctuation.

primary
boolean
required

Whether this is the primary PIX key, the one a charge settles to when it names no pix_key_id. On a webhook snapshot it is the value as of that event: setting the primary key fires no event, so the key list is the source for the current primary.

Example:

false

status
enum<string>
required

The current status of the PIX key:

  • PENDING_VERIFICATION: an EMAIL or PHONE key waiting for its holder's code; not registered yet. Deleted after 24 hours without a verify.
  • INACTIVE: created or verified, registration with the provider in progress. Rinne finishes it and reports ACTIVE, or DELETED when the provider refuses the key.
  • ACTIVE: registered and receiving payments
  • FAILED: a random key whose registration could not be completed; create a new one
  • PENDING_DELETION: deletion requested, removal from the provider in progress
  • DELETED: removed - by a delete, by a claim that moved the key to another institution, by the provider refusing its registration, or a pending key abandoned or whose code could not be sent
Available options:
PENDING_VERIFICATION,
INACTIVE,
ACTIVE,
FAILED,
PENDING_DELETION,
DELETED
Example:

"PENDING_VERIFICATION"

claim
object | null
required

The claim in progress on the key (PENDING_VERIFICATION, OPEN, WAITING_RESOLUTION or CONFIRMED), null when there is none. A claim with side: DONOR is one another institution opened on this key: answer it by confirming or cancelling the claim. While it lasts the key keeps receiving payments but cannot be deleted or made primary.