Skip to main content
curl -X POST https://api.chargeapi.co/v1/webhook_endpoints \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "enabled_events": [
    "report.succeeded"
  ],
  "url": "https://example.com/webhook/endpoint"
}'
{
    "id": "wh_9AXfWD8JdB9RKQiX4Q5dO9YlkSllYkAh",
    "object": "webhook_endpoint",
    "api_version": "2026-03-01",
    "application": null,
    "created": "2026-04-01T00:34:42.679Z",
    "description": null,
    "enabled_events": ["report.succeeded", "reservation.confirmed"],
    "livemode": false,
    "metadata": {},
    "secret": "whsec_JXEBYs1mbO4jcAwl9jqdmAkyJdFF5M1s",
    "status": "enabled",
    "url": "https://example.com/webhook/endpoint"
}
Creates a webhook endpoint. Provide the public HTTPS URL Charge should call and the event types to deliver.
curl -X POST https://api.chargeapi.co/v1/webhook_endpoints \
  -H "Authorization: Bearer ch_sk_test_..." \
  --json '{
  "enabled_events": [
    "report.succeeded"
  ],
  "url": "https://example.com/webhook/endpoint"
}'
{
    "id": "wh_9AXfWD8JdB9RKQiX4Q5dO9YlkSllYkAh",
    "object": "webhook_endpoint",
    "api_version": "2026-03-01",
    "application": null,
    "created": "2026-04-01T00:34:42.679Z",
    "description": null,
    "enabled_events": ["report.succeeded", "reservation.confirmed"],
    "livemode": false,
    "metadata": {},
    "secret": "whsec_JXEBYs1mbO4jcAwl9jqdmAkyJdFF5M1s",
    "status": "enabled",
    "url": "https://example.com/webhook/endpoint"
}

Parameters

enabled_events
array of string
required
List of event types to subscribe to.
url
string
required
Public HTTPS URL that will receive webhook POSTs.

More parameters

api_version
string
Override the default API version for this endpoint.
description
string
Optional description for your own reference.
metadata
object
Set of key-value pairs that you can attach to an object.

Returns

Returns the created webhook endpoint.