PATCH
/
webhooks
/
{id}
/

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Object ID (UUID)

Body

application/json

Defines a webhook rule to an external server. The callback URL will receive a POST request with the related object's (e.g. Purchase for purchase.* webhooks) data in body when any of the events (see the description of events field below) it is configured to listen for are triggered. The payload object will additionally include an "event_type" field to indicate which event type (see the Webhook.events field) triggered the webhook.

Note that, as well as with the rest of dataset, test and live Webhooks are separate; test webhooks will not handle events caused by live Purchases, and vice-versa.

title
string
required

Arbitrary title of webhook

all_events
boolean
default: false

Specifies this webhook should trigger on all event types. Either this or events is required.

public_key
string

PEM-encoded RSA public key for authenticating webhook or callback payloads

events
enum<string>[]
required

List of events to trigger webhook callbacks for. Either this or all_events is required.

Available options:
purchase.created,
purchase.paid,
purchase.payment_failure,
purchase.pending_execute,
purchase.pending_charge,
purchase.cancelled,
purchase.hold,
purchase.captured,
purchase.pending_capture,
purchase.released,
purchase.pending_release,
purchase.preauthorized,
purchase.pending_recurring_token_delete,
purchase.recurring_token_deleted,
purchase.subscription_charge_failure,
purchase.pending_refund,
payment.refunded,
billing_template_client.subscription_billing_cancelled,
payout.pending,
payout.failed,
payout.success
callback
string
required

Response

200 - application/json

Defines a webhook rule to an external server. The callback URL will receive a POST request with the related object's (e.g. Purchase for purchase.* webhooks) data in body when any of the events (see the description of events field below) it is configured to listen for are triggered. The payload object will additionally include an "event_type" field to indicate which event type (see the Webhook.events field) triggered the webhook.

Note that, as well as with the rest of dataset, test and live Webhooks are separate; test webhooks will not handle events caused by live Purchases, and vice-versa.

type
string

Object type identifier

id
string
created_on
integer

Object creation time

updated_on
integer

Object last modification time

title
string
required

Arbitrary title of webhook

all_events
boolean
default: false

Specifies this webhook should trigger on all event types. Either this or events is required.

public_key
string

PEM-encoded RSA public key for authenticating webhook or callback payloads

events
enum<string>[]
required

List of events to trigger webhook callbacks for. Either this or all_events is required.

Available options:
purchase.created,
purchase.paid,
purchase.payment_failure,
purchase.pending_execute,
purchase.pending_charge,
purchase.cancelled,
purchase.hold,
purchase.captured,
purchase.pending_capture,
purchase.released,
purchase.pending_release,
purchase.preauthorized,
purchase.pending_recurring_token_delete,
purchase.recurring_token_deleted,
purchase.subscription_charge_failure,
purchase.pending_refund,
payment.refunded,
billing_template_client.subscription_billing_cancelled,
payout.pending,
payout.failed,
payout.success
callback
string
required