Creates a new webhook subscription.
The list of events for which the caller will receive webhooks. For any proxy webhookType, this field should be left empty, and we will automatically send the events associated with that specific proxy.
Peach supports two ways of receiving webhooks:
direct- events will be provided directly to the url nominated by the lender, and the event data will match Peach's data format.proxyGalileo- events will trigger Peach to make specific API calls to Galileo, so Galileo's sub-ledger remains in sync with Peach's ledger.
Note: when setting webhookType as proxyGalileo, please work with the Peach team to ensure the API calls you require are configured.
If true events will be sent to this webhook, if false no events will be sent to it.
Indicates the amount of information the receiver of webhooks will get. Only applicable if webhookType=direct.
false- Peach will provide a minimum amount of data. For example: event identifier, event name, timestamp and identifier(s) of associated object(s) (e.g. loan ID, borrower ID, transaction ID, etc.)true- in addition to the data provided in thefalseoption, Peach will provide full details of the object(s) associated with the event.
Currently we support hydrating the following objects:
borrowerloantransactioncase
The details required for Peach to pass the events via webhook. Required only if webhookType=direct.
- oauth2
- bearerAuth
- apiKeyHeader
curl -i -X POST \
https://sandboxapi.peach.finance/api/webhooks \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"eventTypes": [
"string"
],
"webhookType": "direct",
"enabled": true,
"hydrateData": false,
"webhookDirectDetails": {
"webhookUrl": "string"
},
"webhookProxyDetails": {
"galileoApiLogin": "string",
"galileoApiTransKey": "string",
"galileoBaseUrl": "string",
"galileoProviderId": "string"
}
}'{ "message": "string", "status": 0, "data": { "eventTypes": [ … ], "webhookType": "direct", "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "companyId": "string", "enabled": true, "hmacSecretKey": "string", "hydrateData": false, "webhookDirectDetails": { … }, "webhookProxyDetails": { … } } }