Skip to main content
PATCH
/
api
/
v1
/
bila
/
webhooks
/
{id}
Update a webhook config
curl --request PATCH \
  --url https://api.usebila.com/api/v1/bila/webhooks/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com/webhooks",
  "events": [
    "payment.completed",
    "collection.completed"
  ],
  "isActive": true
}
'
{
  "status": true,
  "message": "Operation completed successfully",
  "data": {
    "id": "68f11209-451f-4a15-bfcd-d916eb8b09f4",
    "merchantId": "68f11209-451f-4a15-bfcd-d916eb8b09f5",
    "url": "https://example.com/webhooks/bila",
    "secret": "a1b2****c3d4",
    "events": [
      "payment.completed",
      "collection.completed"
    ],
    "isActive": true,
    "createdAt": "2026-04-01T10:00:00.000Z",
    "updatedAt": "2026-04-15T14:30:00.000Z"
  }
}

Authorizations

x-api-key
string
header
required

Merchant API key (e.g., sk_live_xxx or sk_test_xxx)

Path Parameters

id
string
required

Webhook config UUID

Example:

"68f11209-451f-4a15-bfcd-d916eb8b09f4"

Body

application/json
url
string

Webhook endpoint URL

Example:

"https://example.com/webhooks"

events
enum<string>[]

Event types to subscribe to

Available options:
order.created,
order.paid,
order.cancelled,
stock.low,
payment.created,
payment.completed,
payment.failed,
collection.pending,
collection.completed,
collection.failed,
withdrawal.created,
withdrawal.completed,
withdrawal.failed,
transaction.updated,
transfer.pending,
transfer.completed,
transfer.failed,
settlement.completed
Example:
["payment.completed", "collection.completed"]
isActive
boolean

Whether the webhook is active

Example:

true

Response

200 - application/json

Webhook config updated

status
boolean
required

Request success status

Example:

true

message
string
required

Response message

Example:

"Operation completed successfully"

data
object