Webhooks introduction
Your user just bought an asset that has been tokenized through the Original API. Nice! Now, you may want to:
- Store a receipt of it in your database.
- Associate a user wallet account with their account in your system.
- Pop the cork to celebrate in your UI .
There are a number of asynchronous events that occur throughout the Original API. To find out when these events have been completed successfully, you can subscribe to Webhook events easily.
- The webhook is configured per App.
The same URL can be used for multiple apps - The webhook URL to consume the events must allow the relevant permissions to receive events.
- A webhook event will be sent on successful completion.
- The webhook may retry to send an event if an error occurs or there is bad configuration.
The event will contain the number of attempts and a correlation ID that can be used to prevent repeated events.
Each event will contain the following in the
- headers for HTTPS events
- message attributes for AWS SQS events
"x-app-uid": "XXXXXXXXXXXX",
"x-webhook-correlation-id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
"x-webhook-attempt": "1",
"x-webhook-signature": "key-xxxx,signature-xxxxxx-xxxxxxxx"
Use x-app-uid
to correlate with your app.
Use x-webhook-correlation-id
to guard against repeated events.
Use x-webhook-attempt
to get the attempt number for that provider.
Use x-webhook-signature
to verify webhook events come from Original (see more in Keys)
Updated about 2 months ago