Webhook Subscribers

Create a Webhook Subscriber

Create a new Webhook Subscriber

post/webhook-subscribers

Request body

recipientUrlstring required

The URL to send the webhook to. Must be a valid HTTPS URL

subscribedTostring[] required

Example request

{
  "recipientUrl": "https://my-be-url.com/webhooks",
  "subscribedTo": [
    "customer.created"
  ]
}

Response

OK

createdAtstring date-time required

The date and time when the entity was created.

updatedAtstring date-time nullable required

The date and time when the entity was last updated.

metadataobject nullable

Metadata used by merchants to store additional information about the entity.

idstring required

The unique identifier of the webhook subscriber

activeboolean required

Whether the webhook subscriber is active and will receive events

recipientUrlstring required

The URL where webhook events will be delivered via HTTP POST

subscribedTostring[] required

The list of event types this subscriber receives webhooks for. Covers lifecycle events for customers, subscriptions, payments, transactions, invoices, products, and prices.

sharedSecretstring required

The shared secret used to verify webhook signatures. Only returned once upon creation and cannot be retrieved again.

Example response

{
  "createdAt": "2024-02-18T12:00:00Z",
  "updatedAt": "2024-02-21T12:15:00Z",
  "metadata": {
    "key1": "value1",
    "key2": "value2"
  },
  "active": true,
  "recipientUrl": "https://my-backend.com/webhooks",
  "subscribedTo": [
    "customer.created",
    "customer.updated"
  ],
  "sharedSecret": "218f5208d105f754025bb5cfa6b6aefd"
}

Changes

Changed in 1 of the 2 revisions of this API.1