Overview

Use Webhooks to be notified of events in the Nerve platform. Note: Currently, Nerve supports one webhook per event, per environment.

Structure

When receiving a webhook notification, there will be an event and id fields:

{
    "event": "account_connection.update",
    "id": "acon_XXXXX",
    "timestamp": 1644893096,
    "event_data": {
        /* event-specific data */
    },
    "user_data": {}
}

Validation (Optional)

Validating that webhooks originate from Nerve ensures that a webhook notification is authentic. If a webhook object has been created with the basic_user or basic_secret fields, notifications from Nerve will include an additional Authorization header that is the base64-encoded value of {basic_user}:{basic_secret}. When the base64 header matches the value your application expects, the request is authentic.

Example Header
Authorization: Basic YmVzdXJldG86ZHJpbmt5b3Vyb3ZhbHRpbmU=

Methods

POST  /webhook
Subscribe to a type of event.

Body Parameters

url
string
required

The HTTPS URL where the event notification will be sent.

event
string
required

Event to subscribe to. See below for a list of available events.

basic_user
string

First value in base64(basic_user:basic_secret), sent as Authorization for request validation. This field will not appear in responses.

basic_secret
string

Second value in base64(basic_user:basic_secret), sent as Authorization for request validation. This field will not appear in responses.

user_data
object

User defined data that can be attached to the object. See the User Data page for details.

Example


Properties

id
string

Identifier for this webhook.

url
string

The HTTPS URL where the event notification will be sent.

event
string

Event to subscribe to. Possible values are:

  • account_connection.update
  • payout.update
basic_user
string

First value in base64(basic_user:basic_secret), sent as Authorization for request validation. This field will not appear in responses.

basic_secret
string

Second value in base64(basic_user:basic_secret), sent as Authorization for request validation. This field will not appear in responses.

user_data
object

User defined data that can be attached to the object. See the User Data section for details.