Skip to main content

Webhooks

This section gathers endpoints for managing notifications by the receiving PSP for the end user recipient.


Configure Webhook​

Endpoint to create a new webhook configuration to receive automatic notifications of DICT events.

POST /v1/webhook
Requires authorization for the scope: webhook.write


Request

{
"webhookUrl": "https://api.exemplo.com/webhook/dict",
"contexts": [
"dict-claim",
"dict-refund-request"
]
}

Responses

The responses below represent Success(201) from the consumption.

{
"uuid": "dd320762-cbf1-465a-b7d8-2fddf51325ac"
}

List Webhooks​

Endpoint to list all webhooks configured for your account.

GET /v1/webhook
Requires authorization for the scope: webhook.read


Request

The request sent to this endpoint does not require a body, only the OAuth authorization headers and the account certificate.

Responses

The response below represents a Success(200) consumption.

{
"webhooks": [
{
"id": "dd320762-cbf1-465a-b7d8-2fddf51325ac",
"webhookUrl": "https://api.exemplo.com/webhook/dict",
"cnpj": "12345678000195",
"criacao": "2024-01-15T10:30:00Z",
"contexts": [
"dict-claim",
"dict-refund-request"
]
}
]
}

Get Webhook​

Endpoint to retrieve specific details of a webhook.

GET /v1/webhook/:uuid
Requires authorization for the scope: webhook.read


Responses

The responses below represent Success(200) and Failures/errors from the request.

{
"id": "dd320762-cbf1-465a-b7d8-2fddf51325ac",
"webhookUrl": "https://api.exemplo.com/webhook/dict",
"contexts": [
"dict-claim",
"dict-refund-request"
],
"criacao": "2024-01-15T10:30:00Z"
}

Update Webhook Contexts​

Endpoint to update the contexts of an existing webhook.

PUT /v1/webhook/:uuid
Requires authorization for the scope: webhook.write


Request

{
"contexts": [
"dict-claim",
"dict-refund-request"
]
}

Responses

The responses below represent Success(200) from the consumption.

{
"id": "dd320762-cbf1-465a-b7d8-2fddf51325ac",
"webhookUrl": "https://api.exemplo.com/webhook/dict",
"criacao": "2024-01-15T10:30:00Z",
"contexts": [
"dict-claim",
"dict-refund-request"
]
}

Delete Webhook​

Endpoint to permanently remove a configured webhook.

DELETE /v1/webhook/:uuid
Requires authorization for the scope: webhook.write


Responses

The responses below represent Success(200) and Failure/error consumption.

{
"id": "dd320762-cbf1-465a-b7d8-2fddf51325ac",
"webhookUrl": "https://api.exemplo.com/webhook/dict",
"criacao": "2024-01-15T10:30:00Z",
"contexts": [
"dict-claim",
"dict-refund-request"
]
}