Aller au contenu principal

Authorize Webhook

Description​

The Authorize webhook is triggered whenever an OCPP Authorize request is processed by the Fuzz Local Controller.

When a charging station receives an identification tag (e.g., via RFID card, Plug & Charge, or manual entry), it sends an Authorize request to the Fuzz edge controller. After the authorization decision is made - whether locally, via a plugin, or by forwarding to a CPO - Fuzz sends this webhook event to notify your system of the result.

This webhook fires in two scenarios:

  • Post-Authorize: After the CPO responds to an authorization request forwarded by Fuzz.
  • Post-Start Charging: When a transaction starts and the authorization status is re-evaluated.

Payload Structure​

The webhook uses the standard Fuzz envelope with an Authorize-specific payload:

{
"eventId": "3c977fbe-ee7b-4f61-bdd5-035a77e56437",
"eventType": "Authorize",
"siteId": "y1u00tdl",
"timestamp": "2023-10-01T12:00:00+02:00",
"payload": {
"stationId": "jvpfa6ie",
"idTag": "12345",
"status": "Accepted",
"chargePointId": "1sjn7tza",
"connectorId": 1
}
}

Envelope Fields​

FieldTypeDescription
eventIdstringUnique identifier of the webhook event (UUID).
eventTypestringAlways "Authorize" for this event type.
siteIdstringThe unique identifier of the site where the station is located.
timestampstringISO 8601 timestamp in the Europe/Brussels timezone.

Payload Fields​

FieldTypeRequiredDescription
stationIdstringYesThe unique identifier of the station that processed the authorization.
idTagstringYesThe identification tag presented by the EV driver (e.g., RFID card number, vehicle certificate ID).
statusstringYesThe authorization status. Possible values: Accepted, Blocked, Expired, Invalid, ConcurrentTx.
chargePointIdstringNoThe identifier of the charge point associated with the authorization.
connectorIdintegerNoThe connector ID on which the transaction is associated. Present when a transaction is already in progress.

Status Values​

StatusDescription
AcceptedThe idTag was accepted and the EV driver is authorized to charge.
BlockedThe idTag is blocked and cannot be used for charging.
ExpiredThe idTag has expired and is no longer valid.
InvalidThe idTag is not recognized or is malformed.
ConcurrentTxThe idTag already has an active transaction and cannot start another.

Retry Mechanism​

Fuzz keeps delivering an event while your endpoint is unreachable:

  • Events are sent one after the other, in the order they occur. Up to 1000 events per webhook type wait while your endpoint does not answer.
  • A request that fails is retried every 10 seconds, up to 360 times: about 60 minutes in total. After that, the event is dropped.
  • A retried request keeps the same x-request-id: use it to ignore an event you already processed.
  • The webhook delivery state (pending events, duration of the last request) appears in the health checks of the site.

Example HTTP Request​

Below is an example of a signed HTTP request sent by Fuzz for an Authorize webhook:

POST /webhook/events HTTP/1.1
Host: partner.example.com
Content-Type: application/json
Content-Length: 412
x-request-id: 3c977fbe-ee7b-4f61-bdd5-035a77e56437
Signature-Input: sig1=created=1696176000;keyId="webhook";alg="rsa-pss-sha256";headers="@method @path x-request-id"
Signature: MEUCIQDX4p6vK8fN2mR7sT1uV3wX5yZ0aBcDeFgHiJkLmNoPqRsTuVw

{
"eventId": "3c977fbe-ee7b-4f61-bdd5-035a77e56437",
"eventType": "Authorize",
"siteId": "y1u00tdl",
"timestamp": "2023-10-01T12:00:00+02:00",
"payload": {
"stationId": "jvpfa6ie",
"idTag": "12345",
"status": "Accepted",
"chargePointId": "1sjn7tza",
"connectorId": 1
}
}

Signature Headers​

All requests are signed following the RFC 9421 standard:

HeaderDescription
x-request-idUnique identifier for the request, generated as a UUID.
Signature-InputDeclares the signature parameters: created timestamp, keyId identifier, signing algorithm (alg), and the list of HTTP components included in the signature (@method, @path, x-request-id).
SignatureThe cryptographic signature over the declared components, generated using the Fuzz edge keystore.

Verifying the Signature​

The public key used to verify webhook signatures is available via the JWKS endpoint:

https://auth.fuzz.energy/.well-known/jwks.json

Use the key with kid: "sign" to validate the signature. This allows you to cryptographically verify that each webhook request originates from Fuzz and has not been tampered with in transit.