Webhooks
Altruon sends signed events to your server when subscriptions, invoices, payments and sessions change. Set up an endpoint and handle deliveries.
Altruon webhooks notify your server when something happens on your account: a subscription is created, an invoice is paid, a payment fails, a session completes. Each webhook is an HTTPS POST with a JSON payload, signed with a secret that belongs to the endpoint.
These are the webhooks Altruon sends to you
The webhooks you set up on your billing platform and your acquirers are events that Altruon receives. They are a different thing. See The two webhook directions.
How it works
- You register an endpoint, an HTTPS URL on your server, in the backoffice and choose which events it receives.
- Altruon generates a signing secret for the endpoint. It is shown once.
- When a subscribed event occurs, Altruon sends a signed JSON event to your URL.
- Your server verifies the signature, responds with a
2xxstatus and processes the event asynchronously. - Failed deliveries are retried with increasing delays. Every attempt is listed in the delivery log in the backoffice.
Payloads are thin on purpose: they say what happened and to which resource. Fetch the current state from the API, for example with Get transaction details, instead of relying on payload contents that may be stale by the time you process the event.
Create an endpoint
You can have up to 2 active endpoints per site. Use the second one for a staging consumer or during a migration.
Open the webhook settings
In the backoffice, go to Settings > Webhooks and click Add endpoint.

Enter the endpoint details
| Field | Required | Description |
|---|---|---|
| Endpoint URL | Yes | Your HTTPS URL, for example https://api.example.com/webhooks/altruon. Plain http://, credentials in the URL, and private or loopback addresses are rejected. |
| Description | No | A label for your team, for example Production billing sync. |
Click Send test event to check the URL before you save. Altruon sends an unsigned webhook.ping and expects a 2xx response. It is unsigned because the endpoint has no secret yet.

Select events
Pick at least one event. Events are grouped by resource (subscription, invoice, payment and so on) and you can search them. See Event types for the full list.

Copy the signing secret
After you confirm, Altruon shows the signing secret of the endpoint. It starts with whsec_. Store it in your secret manager.
The secret is shown once
Copy it now. Afterwards the backoffice only shows its last 4 characters.

Event payload
Every event is delivered in the same JSON envelope.
idstringUnique event ID with the evt_ prefix. Retries of the same event reuse the same ID, so use it to deduplicate.
typestringOne of the event types, for example payment.succeeded.
created_atstringISO 8601 timestamp of when the event occurred.
domainstringYour tenant domain. "test" for test events sent from the backoffice.
livemodebooleantrue for production events, false for sandbox and test events.
dataobjectWhat the event is about.
objectobjectThe affected resource.
resourceTypestringOne of SUBSCRIPTION, PAYMENT, CUSTOMER, INVOICE, REFUND, ORDER.
sourcestringWhere the event came from. gateway in the example below.
providerRefobjectReference to the resource at the provider.
providerstringName of the provider, for example PAGBRASIL.
resourceIdstringID of the resource at the provider.
connectionIdstringUUID of the Altruon connection to that provider.
fetchHintstringA plain-text hint on how to fetch the resource.
previous_attributesobject | nullOn update events, the fields that changed, with their previous values. null otherwise.
truncatedbooleantrue if the payload exceeded the 256 KB limit and was truncated.
{
"id": "evt_7f3c2a1b-8d4e-4f6a-9b2c-1e5d7a8f9c0b",
"type": "payment.succeeded",
"created_at": "2026-07-14T13:07:00.000Z",
"domain": "your-tenant.altruon.io",
"livemode": false,
"data": {
"object": {
"resourceType": "PAYMENT",
"source": "gateway",
"providerRef": {
"provider": "PAGBRASIL",
"resourceId": "ORD123456",
"connectionId": "550e8400-e29b-41d4-a716-446655440000"
},
"fetchHint": "Use providerRef.resourceId to query platform or Altruon"
},
"previous_attributes": null,
"truncated": false
}
}Delivery and retries
| Method | POST with Content-Type: application/json |
| User agent | Altruon-Webhook/1.0 |
| Signature | Altruon-Signature header. See Verify signatures. |
| Timeout | 10 seconds. Respond within this window. |
| Success | Any 2xx response status |
| Retries | Failed deliveries are retried with increasing delays, roughly 2 hours, 12 hours, then 24 hours after each failure. At most 4 attempts in total. |
| Ordering | Deliveries to an endpoint are sent in order, but retries mean events can arrive out of order. |
| Idempotency | Retries reuse the same event id. |
What is retried: timeouts, connection errors, HTTP 5xx, 429, and a few transient 4xx statuses such as 408 and 409. Most other 4xx responses, such as 400 and 401, count as permanent failures and are not retried.
Automatic disabling: Altruon disables an endpoint after 50 consecutive failures, or when its failure rate stays at 95% or more over 3 days. A disabled endpoint receives no deliveries until you enable it again in the backoffice.
Manage and monitor endpoints
The list under Settings > Webhooks shows for each endpoint its status (Active or Inactive), the number of subscribed events, the last delivery and the success rate, with aggregate analytics cards on top. You can enable or disable an endpoint from the list at any time.
Click an endpoint to open its detail page:
- Deliveries: every attempt with its event type, status, response code, duration and the full payload sent. You can resend a failed delivery manually.
- Events: the events the endpoint is subscribed to. You can edit them at any time.
- Settings: the URL, the description, the status and a preview of the signing secret (its last 4 characters).
Send Test on the detail page sends a signed webhook.ping. Use it to check your signature verification end to end.
Best practices
- Verify every request. Check the
Altruon-Signatureheader and reject anything invalid with a400. - Respond with a 2xx within 10 seconds. Return
200straight away and process the event on a queue or a worker. A slow handler hits the timeout and triggers a retry. - Deduplicate on the event
id. You will occasionally receive the same event more than once. - Treat events as triggers and fetch the state. Read the current resource from the Altruon API instead of trusting the payload as a snapshot.
- Do not rely on ordering. A retried
payment.succeededcan arrive after a laterinvoice.paid. Comparecreated_at. - Check
livemode. It keeps sandbox and production events from crossing environments.