Webhooks
3 min
primevault sends webhook notifications when a transaction reaches a terminal state, allowing your application to react to transaction outcomes without continuously polling the api configure one or more endpoint urls in settings → webhooks primevault sends each event to every configured endpoint webhook event type transaction status changed version 2 0 0 event sent when a transaction reaches completed, failed, or declined the current transaction is available in data transaction, and eventid identifies the webhook delivery retries and delivery behavior primevault sends each webhook as an http post request with a json body return a 2xx response as soon as the event has been accepted, then perform longer processing asynchronously • request timeout — 30 seconds per attempt if the endpoint does not respond in time, the attempt fails • attempts — up to 4 total one initial attempt plus up to three retries • backoff — 2 seconds before the second attempt and 4 seconds before the third and 6 before the fourth • retry conditions — network errors, timeouts, and http 4xx or 5xx responses are retried • after final failure — delivery stops after the third failed attempt handling recommendations retries can produce duplicate deliveries, for example, when your endpoint processes a request but its response is lost make webhook handling idempotent and deduplicate using eventid