Skip to main content

Webhook Resend

Nossa API de Webhook possui o módulo de Reenvio, com esses serviços você consegue reenviar e consultar Webhooks sem precisar acionar o time da Celcoin, esse módulo contempla os seguintes serviços:


Sabemos que não é possível garantir que seu servidor esteja 100% disponível para receber todos os gatilhos da API de Pix Celcoin. Pensando nisso, criamos um mecanismo de controle e gerenciamento dos webhooks que estão pendentes de envio, de forma que seu sistema não receba requisições em excesso quando ele não estiver preparado para isso.

warning

Attention!

Os serviços de Reenvio de Webhook e Consulta de detalhes de Webhook enviado só podem ser utilizados com o limite de até 07 dias após a data da transação.

Para casos posteriores à 07 dias, é possível utilizar nossa API de Consulta de Status da Transação para obter as informações correspondente ao evento.


1. Consultar Quantidade de Webhooks enviados

Passos para integrar

  1. Perform API authentication - [ API Reference ]
  2. Consultar Quantidade de Webhooks enviados - [API Reference]

Campos obrigatórios para realizar a Busca:

ParametersDescriptionType
EntityIdentificador do Evento do Webhook existente.String
Ex: onboarding-create
DateFromStart date.String (date-time)
Ex: 2023-11-03T06:30:00-03:00
DateToEnd date.String (date-time)
Ex: 2023-11-03T06:30:00-03:00

Campos opcionais para facilitar a Busca:

ParametersDescriptionType
OnlyPendingEsta com envio pendente ou nao. falseboolean
true / false
webhookIdIdentificador de Webhook.string
documentNumberNumero do documentostring
accountNumero da contastring
idstring
clientRequestIdstring

cURL Call

JSON

curl --request GET \ --url 'https://sandbox.openfinance.celcoin.dev/common/v1/webhook/replay/PIX/pix-payment-out?DateFrom=2023-11-03T06%3A30%3A00-03%3A00&DateTo=2023-11-28T06%3A30%3A00-03%3A00' \ --header 'accept: application/json' \ --header 'authorization: Bearer token'

Return example

tip

Success 200

JSON

{ "body": { "onlyPending": false, "entity": "onboarding-create", "dateFrom": "2023-10-03T09:30:00Z", "dateTo": "2023-11-03T09:30:00Z", "totalItems": 5 }, "status": "SUCCESS", "version": "1.0.0" }

danger

Error 400

JSON

{ "version": "1.0.0", "status": "ERROR", "error": { "errorCode": "CIE999", "message": "Ocorreu um erro interno durante a chamada da api." } }


2. Consultar detalhes de Webhook enviado

Passos para integrar

  1. Perform API authentication - [ API Reference ]
  2. Consultar detalhes de Webhook enviado - [API Reference]

Campos obrigatórios para realizar a Busca:

ParametersDescriptionType
EntityIdentificador do Evento do Webhook existente.String
Ex: onboarding-create
DateFromStart date.String (date-time)
Ex: 2023-11-03T06:30:00-03:00
DateToEnd date.String (date-time)
Ex: 2023-11-03T06:30:00-03:00

Campos opcionais para facilitar a Busca:

ParametersDescriptionType
OnlyPendingEsta com envio pendente ou nao. falseboolean
true / false
webhookIdIdentificador de Webhook.string
documentNumberNumero do documentostring
accountNumero da contastring
idstring
clientRequestIdstring
PageRequest page, default: 1.integer
LimitOverall query limit.integer
LimitPerPageTotal webhooks per page.integer

cURL Call

JSON

curl --request GET \ --url 'https://sandbox.openfinance.celcoin.dev/common/v1/webhook/replay/PIX/pix-payment-out/details?DateFrom=2023-11-03T06%3A30%3A00-03%3A00&DateTo=2023-11-29T06%3A30%3A00-03%3A00&Page=1&Limit=200&LimitPerPage=200' \ --header 'accept: application/json' \ --header 'authorization: Bearer {token}'

You can search for a specific status using the following parameters:

Entity -> Identificador do Evento.
Active -> true ou false

Return example

tip

Success 200

JSON

{ "body": { "limit": 200, "currentPage": 1, "limitPerPage": 200, "totalPages": 1, "webhookDetails": [ { "webhookId": "84c5fc12-c2e4-4582-9566-9b334a7486a0", "httpStatusCode": 404, "webhookUrl": "https://webhook.site/3bc30e7c-0cf6-427d-86c8-ba5ae044c4c7", "request": "{\"entity\":\"pix-payment-out\",\"createTimestamp\":\"2023-11-08T17:47:49.2665988\",\"status\":\"CONFIRMED\",\"body\":{\"account\":{\"branch\":\"0001\",\"account\":\"300540655630\",\"name\":\"Nome Sobrenome\",\"documentNumber\":\"04072747580\"},\"onboardingId\":\"84c5fc12-c2e4-4582-9566-9b334a7486a0\",\"clientCode\":\"100011\",\"createDate\":\"2023-11-08T17:47:49.2665988\"}}", "response": "{\"success\":false,\"error\":{\"message\":\"Token not found\",\"id\":null}}", "status": "PENDENTE", "createDate": "2023-11-08T17:47:49.576Z", "lastUpdateDate": "2023-11-08T18:02:50.237Z", "filter": { "documentNumber": "04072747580", "account": "300540655630", "id": null, "clientRequestId": "100011" } }, { "webhookId": "9d7cd74a-ae11-402d-9562-8df18a3419e5", "httpStatusCode": 200, "webhookUrl": "https://webhook.site/e94d2b08-cad1-4003-9fc9-14d466553ebf", "request": "{\"entity\":\"pix-payment-out\",\"createTimestamp\":\"2023-11-21T09:33:37.4078125\",\"status\":\"CONFIRMED\",\"body\":{\"account\":{\"branch\":\"0001\",\"account\":\"300540655671\",\"name\":\"Nome Sobrenome\",\"documentNumber\":\"74756495559\"},\"onboardingId\":\"9d7cd74a-ae11-402d-9562-8df18a3419e5\",\"clientCode\":\"100111\",\"createDate\":\"2023-11-21T09:33:37.4078125\"}}", "response": "This URL has no default content configured. <a href=\"https://webhook.site/#!/e94d2b08-cad1-4003-9fc9-14d466553ebf\">View in Webhook.site</a>.", "status": "ENVIADO", "createDate": "2023-11-21T09:33:37.714Z", "lastUpdateDate": "2023-11-21T09:33:38.586Z", "filter": { "documentNumber": "74756495559", "account": "300540655671", "id": null, "clientRequestId": "100111" } }, { "webhookId": "f933b0b1-86fa-4acd-b198-bdb9135da5ec", "httpStatusCode": 200, "webhookUrl": "https://webhook.site/e94d2b08-cad1-4003-9fc9-14d466553ebf", "request": "{\"entity\":\"pix-payment-out\",\"createTimestamp\":\"2023-11-08T17:55:32.3564276\",\"status\":\"CONFIRMED\",\"body\":{\"account\":{\"branch\":\"0001\",\"account\":\"300540655648\",\"name\":\"Nome Sobrenome\",\"documentNumber\":\"82203566183\"},\"onboardingId\":\"f933b0b1-86fa-4acd-b198-bdb9135da5ec\",\"clientCode\":\"100012\",\"createDate\":\"2023-11-08T17:55:32.3564276\"}}", "response": "This URL has no default content configured. <a href=\"https://webhook.site/#!/e94d2b08-cad1-4003-9fc9-14d466553ebf\">View in Webhook.site</a>.", "status": "ENVIADO", "createDate": "2023-11-08T17:55:32.778Z", "lastUpdateDate": "2023-11-22T15:36:23.547Z", "filter": { "documentNumber": "82203566183", "account": "300540655648", "id": null, "clientRequestId": "100012" } } ], "onlyPending": false, "entity": "pix-payment-out", "dateFrom": "2023-11-03T09:30:00Z", "dateTo": "2023-11-30T09:30:00Z", "totalItems": 3 }, "status": "SUCCESS", "version": "1.0.0" }

danger

Error 400

JSON

{ "version": "1.0.0", "status": "ERROR", "error": { "errorCode": "CIE999", "message": "Ocorreu um erro interno durante a chamada da api." } }


3. Reenviar Webhok

Passos para integrar

  1. Perform API authentication - [ API Reference ]
  2. Reenviar Webhook - [API Reference]

Campos obrigatórios para realizar o reenvio:

ParametersDescriptionType
EntityIdentificador do Evento do Webhook existente.String (path)
Ex: onboarding-create
webhookIdUnique webhook identifierString (query)
Ex : 7d413aa1-d02d-446e-99fd-e9a72dbd61253

Campos opcionais para facilitar o reenvio:

ParametersDescriptionType
DateFromData de iníciostring($date-time)
(query)
DateToData finalstring($date-time)
(query)
OnlyPendingIs it pending shipment or not.boolean
(query)

cURL Call

JSON

curl --request PUT \ --url 'https://sandbox.openfinance.celcoin.dev/common/v1/webhook/replay/PIX/pix-payment-out?DateFrom=2023-11-03T06%3A30%3A00-03%3A00&DateTo=2023-11-30T06%3A30%3A00-03%3A00&webhookId=f933b0b1-86fa-4acd-b198-bdb9135da5ec' \ --header 'accept: application/json' \ --header 'authorization: Bearer token' \ --header 'content-type: application/json' \ --data ' { "filter": { "documentNumber": "123", "account": "124", "id": "124", "clientRequestId": "124" } } '

Return example

tip

Success 200

JSON

{ "body": { "onlyPending": false, "entity": "onboarding-create", "dateFrom": "2023-11-03T09:30:00Z", "dateTo": "2023-11-30T09:30:00Z", "totalItems": 1 }, "status": "SUCCESS", "version": "1.0.0" }

danger

Error 400

JSON

{ "version": "1.0.0", "status": "ERROR", "error": { "errorCode": "CIE999", "message": "Ocorreu um erro interno durante a chamada da api." } }