- Login to the Aqueduct Dashboard and fetch/generate your API key from the settings page
- Use the API to subscribe your webhook endpoint to relevant Aqueduct events. The ones that for provisioning are “provisioning.start” and “provisioning.end”
curl request below, just make sure you properly substitute in
your API key, URL, and secret (tip: if you’re lazy, you can probably just use
the api key as the secret)
- Create a webhook endpoint as an HTTP endpoint in your backend. When an event you are monitoring is triggered, Aqueduct will call this endpoint as a POST request and deliver the data as a JSON payload.
- Trigger a test webhook request to test the integration. You can do this on the Settings page by clicking the “send test event” button next to your webhook
- Trigger a provisioning webhook. You can do this by using any
Invoice template to
create an invoice, and setting the
effective dateto today. Once the invoice is created, a provisioning webhook will immediately fire. the payload will look like:
- Implement logic handling the webhook in your backend. Once you receive the payload, you can run whatever logic is suitable for you app. For example, you want want to provision your customer’s access to your product after the product is mark as paid. Please a 2xx respond status code before running any complex logic so the request doesn’t time out.