O conjunto de endpoints a seguir é responsável pela gestão de Reivindicações.
Criar reivindicação
Endpoint para criar uma nova reivindicação.
Essa operação é feita pelo participante reivindicador a pedido do usuário final. O vínculo atual permanece inalterado, até que haja a confirmação pelo PSP doador.
Nem todo tipo de chave pode ser reivindicado ou portado. A tabela abaixo define as possibilidades:
| compatível? | OWNERSHIP | PORTABILITY |
|---|
| CPF | | ✓ |
| CNPJ | | ✓ |
| PHONE | ✓ | ✓ |
| EMAIL | | ✓ |
| EVP | | |
Reivindica a posse de uma chave Pix. Essa reivindicação tem dois tipos: OWNERSHIP ou PORTABILITY.
No OWNERSHIP, o reivindicador solicita a alteração de uma chave que está em posse de outro usuário, podendo ser apenas do tipo e-mail ou celular.
Na PORTABILITY, o reivindicador solicita a alteração de uma chave que está em sua posse, mas em outro PSP, podendo ser CPF, CNPJ, Email e celular.
POST /dict/claims
Requer autorização para o escopo: claim.ind.write
Requisição
{
"type": "OWNERSHIP",
"key": "+5561988887777",
"keyType": "PHONE",
"claimer": {
"name": "João Silva",
"taxIdNumber": "11122233300",
"type": "NATURAL_PERSON"
},
"claimerAccount": {
"accountNumber": "0007654321",
"accountType": "CACC",
"branch": "0001",
"openingDate": "2010-01-10T03:00:00Z"
}
}
Respostas As respostas abaixo representam Sucesso(201) e Falhas/erros do consumo.
- 🟢 201
- 🔴 400
- 🔴 401
- 🔴 403
- 🔴 500
- 🔴 503
{
"claim": {
"claimer": {
"name": "João Silva",
"taxIdNumber": "11122233300",
"type": "NATURAL_PERSON"
},
"claimerAccount": {
"accountNumber": "0007654321",
"accountType": "CACC",
"branch": "0001",
"openingDate": "2010-01-10T03:00:00.000Z"
},
"completionPeriodEnd": "2020-01-17T10:00:00.000Z",
"donorParticipant": "87654321",
"id": "123e4567-e89b-12d3-a456-426655440000",
"key": "+5561988887777",
"keyType": "PHONE",
"lastModified": "2020-01-10T10:00:00.000Z",
"resolutionPeriodEnd": "2020-01-17T10:00:00.000Z",
"status": "OPEN",
"type": "OWNERSHIP"
},
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"responseTime": 500
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Claim has invalid fields",
"status": 400,
"title": "Claim is invalid",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ClaimInvalid",
"violations": [
{
"property": "claim.key",
"reason": "Value does not match regex '^\\+[1-9]\\d{1,14}$'",
"value": "61988887777"
}
]
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not authenticated",
"status": 401,
"title": "Unauthorized"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
},
"responseTime": 0
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Service is under scheduled maintenance",
"status": 503,
"title": "Service Unavailable",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ServiceUnavailable"
},
"responseTime": 0
}
Confirmar reivindicação
Endpoint para confirmar a operação de reivindicação. Como consequência, vínculo da chave com participante doador é removido.
Status deve estar em WAITING_RESOLUTION.
Para reivindicação de posse, caso razão seja DEFAULT_OPERATION, o prazo de resolução (ResolutionPeriodEnd) deve ter passado. Se a razão informada for USER_REQUESTED, o prazo de encerramento (CompletionPeriodEnd) será adiantado para permitir o encerramento imediato pelo reivindicador.
A tabela abaixo define, a depender da razão e do tipo, quem pode confirmar.
| OWNERSHIP | PORTABILITY |
|---|
| RAZÃO | DOADOR | REIVINDICADOR | DOADOR | REIVINDICADOR |
|---|
| USER_REQUESTED | ✓ | | ✓ | |
| ACCOUNT_CLOSURE | | | ✓ | |
| DEFAULT_OPERATION | ✓ | | | |
IdempotênciaA operação é idempotente. Caso reivindicação já tenha sido confirmada com os mesmos parâmetros e esteja ainda com status CONFIRMED, será retornada resposta equivalente à primeira requisição.
Confirma um processo de reivindicação de chave Pix criado por outro PSP.
O status precisa ser, necessariamente, WAITING_RESOLUTION.
POST /dict/claims/:claimId/confirm
Requer autorização para o escopo: claim.ind.write
Requisição
{
"claimId": "123e4567-e89b-12d3-a456-426655440000",
"reason": "user_requested"
}
Respostas As respostas abaixo representam Sucesso(200) e Falhas/erros do consumo.
- 🟢 200
- 🔴 401
- 🔴 403
- 🔴 404
- 🔴 500
- 🔴 503
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"claim": {
"type": "ownership",
"key": "+5561988887777",
"keyType": "phone",
"claimerAccount": {
"participant": "12345678",
"branch": "0001",
"accountNumber": "0007654321",
"accountType": "CACC",
"openingDate": "2010-01-10T03:00:00.000Z"
},
"claimer": {
"type": "natural_person",
"taxIdNumber": "11122233300",
"name": "João Silva",
},
"donorParticipant": "87654321",
"id": "123e4567-e89b-12d3-a456-426655440000",
"status": "CONFIRMED",
"resolutionPeriodEnd": "2020-01-17T10:00:00.000Z",
"completionPeriodEnd": "2020-01-17T10:00:00.000Z",
"lastModified": "2020-01-10T10:00:00.000Z",
"confirmReason": "user_requested"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not authenticated",
"status": 401,
"title": "Unauthorized"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Entry associated with given key does not exist",
"status": 404,
"title": "Not found",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/NotFound"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
}
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Service is under scheduled maintenance",
"status": 503,
"title": "Service Unavailable",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ServiceUnavailable"
}
}
Cancelar reivindicação
Endpoint para cancelar uma reivindicação de portabilidade ou posse de chave. (Fluxo do Doador ou Reivindicador)
Regras de Cancelamento:PORTABILITY (Portabilidade):| RAZÃO | DOADOR | REIVINDICADOR |
|---|
| user_requested | ✓ | ✓ |
| account_closure | | ✓ |
| default_operation | ✓(após prazo) | |
| fraud | ✓ | ✓(mesmo se CONFIRMED) |
OWNERSHIP (Reivindicação de Posse):| RAZÃO | DOADOR | REIVINDICADOR |
|---|
| user_requested | ✓ | ✓ |
| default_operation | ✓(após prazo) | |
| fraud | ✓ | ✓ |
O que acontece:- 1. Status muda para
CANCELED - 2. Processo é encerrado
- 3. Chave permanece com o doador original
- 4. Ambas as partes são notificadas
Importante!O cancelamento é IRREVERSÍVEL.
Uma vez cancelada, a reivindicação não pode ser reativada.
Reivindicador é quem pode cancelar uma reivindicação de posse. Ver exceção abaixo:
Exceção: Caso razão seja
FRAUD, doador poderá adicionalmente cancelar reivindicação de posse
IdempotênciaA operação é idempotente. Caso reivindicação já tenha sido cancelada com os mesmos parâmetros, será retornada resposta equivalente à primeira requisição
Cancela um processo de reivindicação de chave Pix criado pelo Indireto. A tabela abaixo define, a depender da razão e do tipo, quem pode cancelar.
| PROPRIEDADE | PROPRIEDADE |
|---|
| RAZÃO | DOADOR | REIVINDICADOR | DOADOR | REIVINDICADOR |
|---|
| WAITING_RESOLUTION | CONFIRMED |
|---|
| USER_REQUESTED | | ✓ | ✓ | ✓ | |
| ACCOUNT_CLOSURE | | ✓ | | ✓ | |
| FRAUDE | ✓ | ✓ | ✓ | ✓ | ✓ |
| DEFAULT_OPERATION | | ✓ | ✓ | | |
POST /dict/claims/:claimId/cancel
Requer autorização para o escopo: claim.ind.write
Requisição
{
"claimId": "123e4567-e89b-12d3-a456-426655440000",
"reason": "user_requested"
}
Respostas As respostas abaixo representam Sucesso(200) e Falhas/erros do consumo.
- 🟢 200
- 🟢 200
- 🔴 401
- 🔴 403
- 🔴 404
- 🔴 500
- 🔴 503
Portabilidade
{
"claim": {
"claimer": {
"name": "João Silva",
"taxIdNumber": "11122233300",
"type": "NATURAL_PERSON"
},
"claimerAccount": {
"accountNumber": "0007654321",
"accountType": "CACC",
"branch": "0001",
"openingDate": "2010-01-10T03:00:00.000Z",
"participant": "12345678"
},
"completionPeriodEnd": "2020-01-17T10:00:00.000Z",
"confirmReason": "USER_REQUESTED",
"donorParticipant": "87654321",
"id": "123e4567-e89b-12d3-a456-426655440000",
"key": "+5561988887777",
"keyType": "PHONE",
"lastModified": "2020-01-10T10:00:00.000Z",
"resolutionPeriodEnd": "2020-01-17T10:00:00.000Z",
"status": "CANCELLED",
"type": "PORTABILITY"
},
"correlationId": "a9f13566e19f5ca51329479a5bae60c5",
"responseTime": "2020-01-10T10:00:00.000Z"
}
Reivindicação
{
"claim": {
"cancelReason": "FRAUD",
"cancelledBy": "CLAIMER",
"claimer": {
"name": "João Silva",
"taxIdNumber": "11122233300",
"type": "NATURAL_PERSON"
},
"claimerAccount": {
"accountNumber": "0007654321",
"accountType": "CACC",
"branch": "0001",
"openingDate": "2010-01-10T03:00:00.000Z",
"participant": "12345678"
},
"completionPeriodEnd": "2020-01-17T10:00:00.000Z",
"donorParticipant": "87654321",
"id": "123e4567-e89b-12d3-a456-426655440000",
"key": "+5561988887777",
"keyType": "PHONE",
"lastModified": "2020-01-10T10:00:00.000Z",
"resolutionPeriodEnd": "2020-01-17T10:00:00.000Z",
"status": "CANCELLED",
"type": "OWNERSHIP"
},
"correlationId": "a9f13566e19f5ca51329479a5bae60c5",
"responseTime": "2020-01-10T10:00:00.000Z"
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not authenticated",
"status": 401,
"title": "Unauthorized"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Entry associated with given key does not exist",
"status": 404,
"title": "Not found",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/NotFound"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
}
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Service is under scheduled maintenance",
"status": 503,
"title": "Service Unavailable",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/ServiceUnavailable"
}
}
Concluir reivindicação
Endpoint para concluir reivindicação pelo reivindicador. Como consequência, vínculo da chave com participante reivindicador é criado.
Para reivindicação de posse, status deve ser CONFIRMED e prazo definido pelo campo CompletionPeriodEnd deve ter passado.
Para portabilidade, status deve ser CONFIRMED.
IdempotênciaA operação de conclusão de reivindicação é idempotente. Valem aqui as mesmas considerações feitas sobre esse tema na operação de Criar Vínculo.
POST /dict/claims/:claimId/complete
Requer autorização para o escopo: claim.ind.write
Requisição
A requisição enviada para esse endpoint não precisa de um body, apenas os cabeçalhos de autorização OAuth, parâmetros e o certificado da conta.
Respostas As respostas abaixo representam Sucesso(200) e Falhas/erros do consumo.
- 🟢 200
- 🔴 401
- 🔴 403
- 🔴 404
- 🔴 500
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"claim": {
"type": "OWNERSHIP",
"key": "+5561988887777",
"keyType": "PHONE",
"claimerAccount": {
"participant": "12345678",
"branch": "0001",
"accountNumber": "0007654321",
"accountType": "CACC",
"openingDate": "2010-01-10T03:00:00.000Z"
},
"claimer": {
"type": "NATURAL_PERSON",
"taxIdNumber": "11122233300",
"name": "João Silva"
},
"donorParticipant": "87654321",
"id": "123e4567-e89b-12d3-a456-426655440000",
"status": "CONFIRMED",
"resolutionPeriodEnd": "2020-01-17T10:00:00.000Z",
"completionPeriodEnd": "2020-01-17T10:00:00.000Z",
"lastModified": "2020-01-10T10:00:00.000Z",
"confirmReason": "USER_REQUESTED"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not authenticated",
"status": 401,
"title": "Unauthorized"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Participant is not allowed to access this resource",
"status": 403,
"title": "Forbidden"
}
}
{
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Entry associated with given key does not exist",
"status": 404,
"title": "Not found",
"type": "https://dict.pi.rsfn.net.br/api/v2/error/NotFound"
},
"responseTime": 0
}
{
"responseTime": 0,
"correlationId": "abcdef01-2345-6789-0123-456789012345",
"error": {
"detail": "Our service is currently experiencing an issue. We apologize for the inconvenience and are working to resolve it as soon as possible.",
"status": 500,
"title": "Internal Server Error"
}
}