POST
/
api
/
webhook
/
merchant
  curl --request POST \
  --url https://api.atoa.me/api/webhook/merchant \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://api/endpoint",
  "event": "PAYMENTS_STATUS or EXPIRED_STATUS"
}'
{
  "webhookId": "4a124f25-fe8d-47a0-92c8-16d94cbfe24c",
  "url": "https://api/endpoint",
  "event": "PAYMENTS_STATUS or EXPIRED_STATUS"
}

Generate a webhook event for a specific endpoint . Atoa utilizes webhooks to instantly alert your application, which is particularly valuable for asynchronous events, such as updates on payment transaction status, including completion, failure, or pending. Begin by generating a webhook event for a specific endpoint.

Webhooks allow you to receive notifications about events occurring on Atoa, delivered on your HTTP endpoint. This capability significantly reduces the need to poll the Atoa API for payment status updates, thereby saving time and resources.

When a webhook response is anything other than HTTP 200, it is considered a failure. When this happens, our system uses a retry mechanism, following an exponential back-off strategy. If the webhook continues to fail over 24 hours, Atoa will stop the retry attempts. In these scenarios, we will send an email notification to the business owner with relevant information, including the webhook URL.

Webhook Subscription Guide

To stay updated on the status of payments, subscribe to our webhook with the appropriate event types.

  • PAYMENT_STATUS: Receive webhook notifications for payments that are successful, pending, or failed.
  • EXPIRED_STATUS: Receive webhook notifications for payments that have expired. By default, a payment expires after 3 minutes, but you can modify this duration as needed. Refer to the payment-process API for more information on setting the expiry time.

Ensure your webhook listener is set up to handle these payloads and process the events accordingly.

AUTHORIZATIONS: Bearer <token>

REQUEST BODY SCHEMA

url
string
required

Merchant webhook url provided will receive notification on status code 200 and will be retried on failure.

event
string
required

Event subscribed to which the webhook will be invoked.

RESPONSE

webhookId
string
url
string
event
string