Skip to main content
POST
Create a webhook endpoint

Authorizations

x-api-key
string
header
required

API key for authentication. You can find your API key in the Creem dashboard under Settings > API Keys.

Body

application/json

Webhook endpoint creation payload

url
string

The HTTPS URL Creem will deliver events to. Required unless delivery_mode is cli, in which case it is ignored.

Example:

"https://example.com/webhooks/creem"

delivery_mode
enum<string>

How events reach this endpoint: http deliveries are POSTed to url; cli deliveries wait in the pending-events feed for a local creem listen session.

Available options:
http,
cli
Example:

"http"

name
string

A human-readable label for the endpoint.

Example:

"Production billing events"

events
enum<string>[]

The event type carried in the delivery.

Available options:
checkout.completed,
refund.created,
dispute.created,
subscription.active,
subscription.trialing,
subscription.canceled,
subscription.scheduled_cancel,
subscription.paid,
subscription.expired,
subscription.unpaid,
subscription.update,
subscription.past_due,
subscription.paused,
customer_credits.exhausted,
credits.granted,
credits.consumed,
credits.auto_recharged
Example:

Response

Successfully created the webhook endpoint

id
string
required

Unique identifier for the object.

mode
enum<string>
required

String representing the environment.

Available options:
test,
prod,
sandbox
object
string
required

A string representing the object’s type. Objects of the same type share the same value.

Example:

"webhook"

store_id
string
required

The store this webhook endpoint belongs to.

Example:

"sto_1234567890"

name
string | null
required

A human-readable label for the endpoint.

Example:

"Production billing events"

url
string
required

The HTTPS URL Creem delivers events to. For cli endpoints this is a placeholder that is never called.

Example:

"https://example.com/webhooks/creem"

delivery_mode
enum<string>
required

How events reach this endpoint: http deliveries are POSTed to url; cli deliveries wait in the pending-events feed for a local creem listen session.

Available options:
http,
cli
Example:

"http"

status
enum<string>
required

Whether the endpoint receives deliveries. Disabled endpoints keep their configuration but receive nothing.

Available options:
enabled,
disabled
Example:

"enabled"

events
enum<string>[]
required

The event type carried in the delivery.

Available options:
checkout.completed,
refund.created,
dispute.created,
subscription.active,
subscription.trialing,
subscription.canceled,
subscription.scheduled_cancel,
subscription.paid,
subscription.expired,
subscription.unpaid,
subscription.update,
subscription.past_due,
subscription.paused,
customer_credits.exhausted,
credits.granted,
credits.consumed,
credits.auto_recharged
Example:
secret
string

The signing secret used to verify delivery signatures. Only returned when the endpoint is created; retrieve it later via the secret endpoint.

Example:

"whsec_xxxxxxxxxxxxxxxxxxxx"