Register Webhook
Endpoints to create, list, and remove notification webhooks.
Create Webhook
POST /api/v2/external/webhooksHeaders
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | Bearer {access_token} |
Content-Type | String | Yes | application/json |
hmac | String | Yes | HMAC-SHA512 signature of the body (learn more) |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | String | Yes | HTTPS URL to receive notifications |
events | Array | No | List of events to subscribe to. If omitted, subscribes to all. |
Available events: pix.received, pix.completed, pix.failed, pix.refund, pix.med
Example
bash
BODY='{"url":"https://yoursite.com/webhook","events":["pix.received","pix.completed"]}'
HMAC=$(echo -n "$BODY" | openssl dgst -sha512 -hmac "$CLIENT_SECRET" | awk '{print $2}')
curl -X POST https://api.owem.com.br/api/v2/external/webhooks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-H "hmac: $HMAC" \
-d "$BODY"Success Response (201)
json
{
"worked": true,
"webhook": {
"id": "wh_a1b2c3d4e5f6",
"url": "https://yoursite.com/webhook",
"events": ["pix.received", "pix.completed"],
"status": "active",
"created_at": "2026-03-07T15:30:00Z"
}
}Error Response (422)
json
{
"worked": false,
"detail": "URL must use HTTPS"
}HTTPS only
The webhook URL must use HTTPS. URLs with HTTP will be rejected.
List Webhooks
GET /api/v2/external/webhooksHeaders
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | Bearer {access_token} |
Example
bash
curl -X GET https://api.owem.com.br/api/v2/external/webhooks \
-H "Authorization: Bearer $TOKEN"Success Response (200)
json
{
"worked": true,
"webhooks": [
{
"id": "wh_a1b2c3d4e5f6",
"url": "https://yoursite.com/webhook",
"events": ["pix.received", "pix.completed"],
"status": "active",
"created_at": "2026-03-07T15:30:00Z"
}
]
}Remove Webhook
DELETE /api/v2/external/webhooks/:idHeaders
| Header | Type | Required | Description |
|---|---|---|---|
Authorization | String | Yes | Bearer {access_token} |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | String | Yes | Webhook ID |
Example
bash
curl -X DELETE https://api.owem.com.br/api/v2/external/webhooks/wh_a1b2c3d4e5f6 \
-H "Authorization: Bearer $TOKEN"Success Response (200)
json
{
"worked": true
}Error Response (404)
json
{
"worked": false,
"detail": "Webhook not found"
}