POST
/
webhooks
Create a webhook subscription
curl --request POST \
  --url https://api.balansas.com/functions/v1/customer-api/webhooks \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "url": "<string>",
  "eventTypes": [],
  "description": "<string>"
}
'
{
  "data": {
    "id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "url": "https://example.com/webhooks/balansas",
    "description": "Production payment events",
    "event_types": [
      "payment.created",
      "payee.status_updated"
    ],
    "is_active": true,
    "signing_secret_prefix": "whsec_ab",
    "created_at": "2026-05-28T11:02:09.456Z",
    "updated_at": "2026-05-28T11:02:09.456Z",
    "signing_secret": "whsec_ab12cd34ef56gh78ij90kl12mn34op56"
  }
}

Authorizations

x-api-key
string
header
required

Customer API key. Send as x-api-key: sk_... or Authorization: Bearer sk_.... Write operations also require an X-CSRF-Token header (64-char hex).

Body

application/json
url
string<uri>
required
Maximum string length: 2048
eventTypes
enum<string>[]
required
Required array length: 1 - 50 elements
Available options:
payment.created,
payment.status_updated,
payment.completed,
payment.failed,
fiat_account.created,
fiat_account.status_updated,
fiat_account.balance_updated,
virtual_account.created,
virtual_account.status_updated,
virtual_account.balance_updated,
end_user.created,
end_user.status_updated,
end_user.review_required,
payee.created,
payee.status_updated
description
string
Maximum string length: 500

Response

Success

data
object
required