Webhooks
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.
Authorization: Basic YmVzdXJldG86ZHJpbmt5b3Vyb3ZhbHRpbmU=
Methods
POST
/webhook
Subscribe to a type of event.
Body Parameters
The HTTPS URL where the event notification will be sent.
Event to subscribe to. See below for a list of available events.
First value in base64(basic_user:basic_secret
), sent as Authorization
for request validation. This field will not appear in responses.
Second value in base64(basic_user:basic_secret
), sent as Authorization
for request validation. This field will not appear in responses.
User defined data that can be attached to the object. See the User Data page for details.
Example
Properties
Identifier for this webhook.
The HTTPS URL where the event notification will be sent.
Event to subscribe to. Possible values are:
account_connection.update
payout.update
First value in base64(basic_user:basic_secret
), sent as Authorization
for request validation. This field will not appear in responses.
Second value in base64(basic_user:basic_secret
), sent as Authorization
for request validation. This field will not appear in responses.
User defined data that can be attached to the object. See the User Data section for details.