Cancelamento de Recorrência
Este fluxo é utilizado caso a empresa recebedora deseje cancelar o consentimento previamente realizado por um cliente pagador.
Neste cenário, o pagador havia autorizado o consentimento, mas por qualquer que seja o motivo, a empresa recebedora deseja cancelar aquela recorrência de Pix Automático.
Neste fluxo, a empresa recebedora enviará uma notificação ao cliente pagador cancelando o consentimento e após o retorno do PSP pagador a Celcoin enviará o webhook confirmando o cancelamento daquela jornada. Neste fluxo, não há um cenário onde o cliente pagador possa não concordar com o cancelamento da recorrência.
O cancelamento da recorrência cancelará todas as cobranças futuras associadas.
O cancelamento da recorrência pode ser efetuado através de duas fontes distintas:
- Pelo recebedor (o destinatário do pagamento)
- Pelo pagador (o originador do pagamento)
Cancelamento pelo recebedor
Endpoint POST /recurrencies/{id}/cancel
Request:
{
"cancellationPersonType": integer,
"cancellationTaxId": string,
"cancellingReason": integer | null, (enum RecurrencyCancelledReasonEndpoint),
}
Response
{
"entity": "pix-automatic-payment-instruction-cancelled",
"context": "PIX",
"cliente": {
"nome": "",
"clienteId": 1,
"localId": 1,
"usuarioId": 2
},
"body": {
"endToEndId": string,
"recurrencyId": "RRxxxxxxxxyyyyMMddkkkkkkkkkkk",
"amount": decimal,
"expirationDate": datetime,
"status": integer (enum PaymentInstructionStatus),
"creditParty": {
"ispb": string,
"taxId": string,
"personType": string,
"bank": string | null,
"account": string,
"accountType": int,
},
"debitParty": {
"ispb": string,
"personType": string,
"taxId": string,
"personName": string,
"bank": string | null,
"account": string,
"accountType": string,
"stateCode": string
},
"debtor": {
"personType": string,
"taxId": string,
"name": string
},
"cancellation": {
"id": "ICxxxxxxxxyyyyMMddkkkkkkkkkkk",
"cancelledBy": integer (enum Party),
"taxId": string,
"reason": integer | null, (enum SchedulingCancellationReason),
"date": datetime | null
} | null,
"createDate": datetime,
"updateDate": datetime,
"cancelledDate": datetime | null
"clientRequestId": string | null
}
}
{
"entity": "pix-automatic-recurrency-completed
"context": "PIX",
"cliente": {
"nome": "",
"clienteId": 1,
"localId": 1,
"usuarioId": 2
},
"body": {
"recurrencyId": "id da recorrência, seguindo o formato: RRxxxxxxxxyyyyMMddkkkkkkkkkkk",
"deniedReason": string | null, (smart enum AutomaticPixError),
"interval": {
"start": "datetime",
"end": "datetime",
"frequencyType": "integer (enum FrequencyType)"
},
"status": integer (enum RecurrencyStatus),
"journeys": [
{
"status": integer (enum JourneyStatus),
"type": integer (enum Journey)
"createDate": datetime,
}
],
"amount": "decimal | null",
"creditParty": {
"bank": "string",
"taxId": "string",
"name": "string"
},
"debitParty": {
"ispb": string,
"personType": string,
"taxId": string,
"bank": string | null,
"account": string,
"stateCode": string
},
"debtor": {
"personType": string,
"taxId": string,
"name": string
},
"contract": {
"number": "string",
"description": string | null
},
"allowsNewAttemptsAfterExpiration": boolean
"maxValueFloor": decimal | null,
"createDate": datetime,
"updateDate": datetime,
"cancellation": {
"cancelledDate": datetime,
"cancellationId": string,
"cancellationPersonType": integer,
"cancellationTaxId": string,
"cancellingReason": integer (enum RecurrencyCancelledReason),
},
"allowAutoSendingPaymentInstructions": bool
}
}
Cancelamento pelo pagador
{
"entity": "pix-automatic-recurrency-completed
"context": "PIX",
"cliente": {
"nome": "",
"clienteId": 1,
"localId": 1,
"usuarioId": 2
},
"body": {
"recurrencyId": "id da recorrência, seguindo o formato: RRxxxxxxxxyyyyMMddkkkkkkkkkkk",
"deniedReason": string | null, (smart enum AutomaticPixError),
"interval": {
"start": "datetime",
"end": "datetime",
"frequencyType": "integer (enum FrequencyType)"
},
"status": integer (enum RecurrencyStatus),
"journeys": [
{
"status": integer (enum JourneyStatus),
"type": integer (enum Journey)
"createDate": datetime,
}
],
"amount": "decimal | null",
"creditParty": {
"bank": "string",
"taxId": "string",
"name": "string"
},
"debitParty": {
"ispb": string,
"personType": string,
"taxId": string,
"bank": string | null,
"account": string,
"stateCode": string
},
"debtor": {
"personType": string,
"taxId": string,
"name": string
},
"contract": {
"number": "string",
"description": string | null
},
"allowsNewAttemptsAfterExpiration": boolean
"maxValueFloor": decimal | null,
"createDate": datetime,
"updateDate": datetime,
"cancellation": {
"cancelledDate": datetime,
"cancellationId": string,
"cancellationPersonType": integer,
"cancellationTaxId": string,
"cancellingReason": integer (enum RecurrencyCancelledReason),
},
"allowAutoSendingPaymentInstructions": bool
}
}
Esta documentação ainda está sujeita a atualizações. Quando tivermos a versão final publicada, este aviso será removido de todas as páginas.
Updated 1 day ago