Skip to main content
When Singapay sends a webhook to your endpoint and does not receive a valid response, the system will automatically retry the delivery. Retries are designed to handle temporary disruptions such as timeouts, server downtime, or connection errors.
Each retry is performed with a 1-minute interval between attempts. If all retries are exhausted, a failure notification will be sent to your registered merchant email.

Retry Rules by HTTP Status

The number of retry attempts depends on the HTTP response status returned by your endpoint.
HTTP Status / ConditionHandlerMax RetriesDescription
500 Internal Server ErrorhandleFailedHttpResponse()1Your server encountered an internal error.
503 Service UnavailablehandleFailedHttpResponse()4Your server is temporarily unreachable.
400 / 404 Bad Request / Not FoundhandleFailedHttpResponse()2Endpoint may be incorrect or temporarily unavailable.
307 / 308 Temporary / Permanent RedirectretryRedirect()5Redirects are followed up to 5 times.
301 / 302 / 303 RedirecthandleFailedHttpResponse()0Redirects are not followed — update your endpoint URL.
Exception (cURL error, timeout, DNS)catch(Exception $e)1Connection-level failures.
Other (default)handleFailedHttpResponse()5All other status codes not listed above.
Redirects via 301, 302, or 303 will not be followed and receive zero retries. Make sure your webhook URL points directly to the correct endpoint.

Retry Interval

Interval Between Retries

Each retry attempt is made 1 minute after the previous one. Retries stop once the maximum limit for that status code is reached.

Retry Cache TTL

Retry counts are stored in cache with a 15-minute TTL. All attempts are logged to our database for auditing.

Example: HTTP 503 Retry Flow

Here’s what happens when your endpoint consistently returns 503:
1

Attempt #1

Singapay sends the webhook. Your server responds 503. System schedules a retry in 1 minute.
2

Attempt #2

First retry. Still 503. Another retry scheduled in 1 minute.
3

Attempt #3

Second retry. Still 503. Another retry scheduled.
4

Attempt #4 (Final)

Third and final retry. Still 503. No more retries. Failure logged and notification email sent.
Total maximum delivery time for a 503 scenario: approximately 4 minutes across all attempts.

What Happens After All Retries Fail

If the webhook cannot be delivered after all retry attempts:
  1. The failure is logged in the database and visible via the Callback menu on your merchant dashboard.
  2. A failure notification email is sent to your registered merchant email address.

Best Practices

Return 2xx

Always respond with an HTTP status between 200–299 to acknowledge receipt.

Stay Available

Keep your webhook endpoint stable and publicly accessible at all times.

Avoid Redirects

Do not use redirect URLs (301–308) as your webhook endpoint.
Process webhooks asynchronously — return 200 OK immediately and handle the payload in a background job to avoid timeouts.