Skip to main content

Webhook

What is Webhooks?

A webhook is a way for an app or service to provide other apps or services with real-time information. It allows one application to notify another application or service about specific events or updates by sending a HTTP POST request to a specified URL when a certain event occurs. Webhooks are commonly used in various scenarios such as triggering actions in response to specific events, integrating different systems, and automating processes. They are commonly used in APIs and web services to facilitate communication and data exchange between different applications.

Why Webhooks?

A webhook allows CCG to notify your system about events related to transactions. When a specific event occurs, such as a successful payment or a refund. This allows your system to receive real-time updates and take appropriate actions based on the event, such as updating the order status or sending a confirmation email to the customer. Webhooks are commonly used to automate processes and keep systems in sync with the payment gateway.

Handling Failures and Retry Mechanism

In the event of a failure from the webhook endpoint, retry attempts will be initiated. The table provided below outlines the error codes that are considered non-retriable.

EndpointNot Retriable Errorcodes
Webhook400 Bad Request, 413 Request Entity Too Large, 403 Forbidden, 404 Not Found, 401 Unauthorized

If the error received from the webhook does not match the codes listed above, a retry will be triggered. Following the initial delivery attempt, we will wait for a response for 30 seconds. If no response is received within this timeframe, the message will be queued for a retry. Our retry mechanism follows an exponential backoff policy, allowing for up to 5 attempts within a 50-minute window.