Skip to main content
POST
/
api
/
v1
/
bila
/
webhooks
Create a webhook config
curl --request POST \
  --url https://api.usebila.com/api/v1/bila/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "https://example.com/webhooks",
  "events": [
    "payment.completed",
    "withdrawal.completed"
  ]
}
'
{
  "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)

Body

application/json
url
string
required

Webhook endpoint URL

Example:

"https://example.com/webhooks"

events
enum<string>[]
required

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", "withdrawal.completed"]

Response

201 - application/json

Webhook config created (secret returned once)

status
boolean
required

Request success status

Example:

true

message
string
required

Response message

Example:

"Operation completed successfully"

data
object