Skip to main content
Webhooks are the mechanism by which the platform communicates, asynchronously, the events relating to transactions, infractions and transfers. For each event, the platform sends an HTTP POST request to the URL designated by the integrator.

Endpoint types

There are two types of endpoint, which may be used together.

Registration

The POST /v1/webhooks operation registers the endpoint. The URL is verified at registration, and the absence of a response results in rejection of the request with status 400. The endpoint must therefore be published beforehand.

Events

Notification structure

The notification body is a JSON object. The top-level fields are common to all events.

Transaction event

For declined card charges, the transaction block additionally contains the refuseReason, acquirerCode and acquirerMessage fields.

Transfer event

The structure of the infraction event is set out in Infractions and MED.

Acknowledgement

The endpoint must respond with a 2xx status to acknowledge receipt. Any other response, as well as the absence of a response, is recorded as a delivery failure. It is recommended that the endpoint acknowledge receipt immediately and perform processing asynchronously.

Retries

In the event of failure, the platform repeats the delivery, up to a limit of five attempts per notification. Once the limit is exhausted, the delivery remains recorded as failed and may be resent at the integrator’s request.

Endpoint requirements

Notification delivery follows at-least-once semantics. The endpoint must therefore meet the following requirements:
  • process each notification idempotently, using the id field to identify repetitions
  • not assume the order of arrival of notifications, and base decisions on the status reported in transaction.status
  • confirm the status of the transaction through GET /v1/transactions/{transactionId} before any irreversible act, as set out in Security and data protection

Testing

The POST /v1/webhooks/{webhookId}/test operation sends test notifications, with fictitious data, to the registered URL and returns the HTTP status returned by the endpoint for each delivery. No real transaction is created or changed.

Audit and redelivery

The GET /v1/webhook-deliveries operation lists the delivery attempts, with the event, the status and the destination URL. The status=error filter identifies the deliveries rejected by the endpoint. The GET /v1/webhook-deliveries/{deliveryId} operation returns the body sent and the response received in each attempt, which makes it possible to determine the origin of the failure. Once the endpoint is corrected, the POST /v1/webhook-deliveries/{deliveryId}/retry operation requests redelivery with the same body.