Key types
A key value can have at most 77 characters. A wallet can hold more than one key, up to the limit of the account.
Register a key
201) is the key. Keep its _id to manage it later, and give payers its value:
default as walletId for the organization’s main wallet.
The key usually comes back ACTIVE, ready to receive. If it comes back PENDING_CONFIRMATION, the phone number or e-mail address must be proven yours first — see Confirm a key with a code.
When registering fails, you get the error and the attempt stays in the wallet’s list as a
FAILED key, with the reason in failReason. If the bank refused the key (422) — for example, because another person or institution already holds it — nothing was registered: fix the cause and register the key again. If the bank failed or didn’t answer in time (5xx), the key may have been registered anyway: registering the same key again then usually answers ENTRY_ALREADY_EXISTS, and support can reconcile it — except an EVP, which a retry registers again as a new random key.422):
Reference: Register a Pix key
Confirm a key with a code
APENDING_CONFIRMATION key waits for a code sent to its phone number or e-mail address.
- Request a code —
POST .../pix-dict/{pixDictId}/request-otp, no body. It answers204. - Confirm the key with the code:
ACTIVE (201). A wrong or expired code is 422 INVALID_OTP_CODE — request a new one. After too many attempts, 422 MAXIMUM_NUMBER_OF_ATTEMPTS_REACHED asks you to wait 24 hours. Both routes answer 409 PIX_DICT_NOT_PENDING_CONFIRMATION for a key that isn’t waiting for a code.
List keys
List a wallet’s keys withGET .../wallets/{walletId}/pix-dict. Removed keys and failed attempts stay in the list, so filter by status to get the keys payers can use:
status takes several values, comma-separated (?status=ACTIVE,PENDING_CONFIRMATION). The response is an array, not paginated. Organization admins can also list every key of an account or of the organization at once.
Remove a key
Remove a key withPOST .../pix-dict/{pixDictId}/remove and no body. It answers 204. Pix sent to the key stop reaching the wallet, the key stays listed as REMOVED, and it can be registered again — here or elsewhere. Removing a key that is already REMOVED, or a FAILED attempt, succeeds and changes nothing — not even at the bank.
A key with an open claim can’t be removed (422 entry_locked_by_claim): answer the claim first.
Answer claims for your keys
Another institution can claim one of your keys on behalf of its customer:- Portability (
type: "portability") — the key’s owner asks to move the key to their account at the other institution. - Ownership (
type: "ownership") — someone says a key you hold, an e-mail address or a phone number, is theirs.
GET /realms/{realmId}/organizations/{organizationId}/pix-dict-claim (filter by key). Each claim says who is claiming (claimer), the account they want the key to point to (claimerAccount) and the deadline to answer (resolutionPeriodEnd). Answer a waiting claim before that deadline, using its id (not its _id):
- Confirm it —
POST .../pix-dict-claim/{id}/confirm— to release the key. This can’t be undone. The key becomesREMOVEDin your wallet when the Pix directory notifies the confirmation, which can come after the response. - Cancel it —
POST .../pix-dict-claim/{id}/cancel— to keep the key.
200 with the claim and the status the Pix directory answered (for example confirmed, processing_confirm or canceled). A claim that isn’t waiting any more answers 404 PIX_DICT_CLAIM_NOT_FOUND. Settled claims stay in the list with their final status (completed, canceled).
Who can do what
API clients act as admins of their organizations. Anyone else gets
403 FORBIDDEN_WALLET.
If the bank throttles a request that reaches it — registering, confirming or removing a key, or answering a claim — you get a 429: wait and retry.
Next steps
Charge with PIX
Generate a PIX QR Code (Copia e Cola) and get notified when it’s paid.
Wallets for your customers
Open a wallet per end customer, read balances, and move money between wallets.