Callbacks

Why Use Callbacks

Ayoconnect uses callbacks to notify merchants of transaction and account status updates through HTTPS requests containing JSON payloads.

Supported Callback Types

Callbacks cover the following Direct Debit operations:

Callback TypeDescription
Account BindingNotifies merchants of the customer's bank account binding result.
Account UnbindingNotifies merchants of the account unbinding result, allowing them to update the customer's account status.
Direct Debit PaymentNotifies merchants of payment status updates, including SUCCESS, PENDING, and FAILED, for both OTP and Non-OTP payments.
Direct Debit RefundNotifies merchants of refund status updates, including successful, pending, and failed refunds.

To receive callbacks, merchants must register the applicable callback URLs with Ayoconnect during onboarding.

Important: Merchants should rely on definitive transaction statuses received through callbacks or the applicable Status Inquiry API, rather than solely on the initial API response.


Callback Behavior

Retry Behavior

Ayoconnect automatically retries callback delivery when the merchant's endpoint fails to acknowledge the request with an HTTP 2xx response.

The first delivery attempt occurs when the corresponding event is ready to be notified. Subsequent retries follow the configured callback retry schedule.

Merchants can also manually retry individual callbacks through the Merchant Dashboard, where supported.

Note: Manual callback retries do not necessarily cancel scheduled automatic retries. Merchants should ensure their systems can handle duplicate callback deliveries.

Disable Behavior

If a callback endpoint consistently fails to return an HTTP 2xx response over multiple days, Ayoconnect may notify the merchant by email before disabling the endpoint.

Merchants should monitor their callback endpoints to ensure continued availability.

Event Ordering

Ayoconnect does not guarantee that callbacks will be delivered in the order they are generated.

For example, a merchant may receive a payment callback before a delayed account binding callback.

Merchants should process each callback independently and use the relevant transaction or account reference to update the correct record.


Best Practices

Handle Duplicate Callbacks

A callback may be delivered more than once due to automatic or manual retries.

Merchants should implement idempotent processing to prevent duplicate updates or unintended actions.

Handle Callbacks Asynchronously

Merchants are recommended to process callbacks asynchronously using a queue to prevent timeouts during high transaction volumes.

Use HTTPS Endpoints

Callback URLs must use HTTPS with a valid SSL/TLS certificate to ensure secure communication.

Allowlist Ayoconnect IP Addresses

Merchants should allowlist Ayoconnect's designated callback IP addresses to ensure successful callback delivery and restrict unauthorized access.

For IP configuration details, refer to the Integration Preparation & Security guide.

Return HTTP 2xx Promptly

Merchant callback endpoints should return an HTTP 2xx response promptly after validating and securely accepting the callback.

Avoid performing time-consuming operations before acknowledging the request, as this may cause timeouts and trigger callback retries.

Verify Transaction Status

If a payment callback is delayed or not received, merchants can use the Payment Status API to retrieve the latest transaction status.

A callback delivery failure does not necessarily indicate that the underlying payment transaction has failed.


Callback Headers

The following headers are included in callback requests from Ayoconnect:

HeaderValueDescription
Acceptapplication/jsonExpected response content type
Content-Typeapplication/jsonJSON request payload

For callback payload specifications, refer to the corresponding API Reference.


Did this page help you?