Configuration and Payload
Before configuring a webhook there are a few reqiurements that must be met.
Requirements
1
Define Webook Url
- Webhook urls must be a valid HTTPS url
- The host of the url must be a DNS name and not an IP address
Example: https://companyx.com/webhooks
2
Determine Event Subscriptions
Decide which event subscriptions are appropriate for your use case.
Example: ACCOUNT
, CUSTOMER.UPDATED
, TRANSACTION
Configuration Request
Make a POST
request to the /webhook to create and configure a webhook.
Configuration Side Effects
Successfully, configuring a webhook will have the following additional results:
-
Automatic subscription to
WEBHOOK.CREATED
Learn More -
Cryptographic public key generated. Learn More
Webhook Payload
The webhook payload is composed of the following:
Name | Definition |
---|---|
eventId | Unique event identifier. Should be used to deduplicate potentially duplicate events |
event | The event type. Example: ACCOUNT |
createdAt | Unix timestamp of when the event was created |
data | The data associated with the event |
Example Payload
In the example below, an account was been created within the system.