Webhooks types
You can configure your own webhooks that A-CUBE API will call when an event happens. To manage your endpoints you can use the API or the dashboard.
Security
To ensure that the transmission of the information to your public endpoints comes from A-Cube, you can:
Configure a secret token
Configure a secret token in the ApiConfiguration() entity that A-Cube will send along with the request to your webhook endpoint.
- Choose
authType=queryto ask A-Cube to send the token as a query parameter. - Choose
authType=headerto ask A-Cube to send the token as a header. - Configure the token key
authKeyand the token valueauthTokenin the ApiConfiguration() entity.
Examples
- In case you chose
headerasauthType,BearerasauthKeyandmysecretasauthToken, A-Cube will send the token in the headerAuthorization: Bearer mysecret. - While in case you chose
queryasauthType,tokenasauthKeyandmysecretasauthToken, A-Cube will send the token in the query parameter?token=mysecret.
Create a webhook
POST /event-destinations
{
"event": "legal-entity.onboarding",
"target": "put your url here",
"delivery": "webhook",
"status": "active",
"authType": "header"|"query"|"none",
"authKey": "X-Auth",
"authToken": "asdfghjk"
}
Verify the signature
Verify the signature that A-Cube sends along with the request to your webhook as explained here.
| Category | Webhook Type | What it does |
|---|---|---|
| Onboarding | legal_entity.onboarding | Receive information about legal-entity onboarding status |
| Invoice | invoice.inbound | Receive information about invoice processing stage |
| Invoice | invoice.outbound | Receive information when incoming invoice is received |
| Invoice | invoice.status | Receive AFNOR statuses |
Example
{
"eventId": "019e91b7-f799-7df7-a469-4824b2656b0e",
"eventType": "legal_entity.onboarding",
"status": "ONBOARDED",
"legalEntityUuid": "01990000-0000-7000-8000-000000000001"
}
All the messages sent to your endpoint are sent with a POST request.
We manage sending the messages to your endpoints with a queue:
if your endpoint fails (we don't get a 200 response) then the webhook will retry 15 times every 300 seconds with a back-off rate of 1.25 for a total of about 10 hours.
If you want to disable endpoints during an operation you can send header X-DisableEndpoints: true.
This header takes effect when sending a new customer invoice or when importing customer or supplier invoices.
Retrigger webhooks
If your endpoint missed a webhook or you need to receive it again, you can manually retrigger the webhook notification using the following endpoints: