What is UniBee webhook?

A Webhook is an HTTP endpoint that receives events from UniBee Webhooks allow you to be notified about payment events that happen outside of your payment flow such as:
  • Successful payments (payment.succeeded)
  • Invoice creation(invoice.created)
  • Subscription Auto-charged(subscription.auto-charge.success)

When to use UniBee webhooks?

UniBee generates multi events that you can listen to in order to trigger your business logic. You will be more fast to receive these events when its generated while using webhook. Also each time an event is generated, you can view it in the Unibee Admin Portal using the webhook logs page. This allows you to take a closer look at the generated events, detect possible errors, and retry them.

How to use UniBee webhooks?

Create Your webhook endpoint (By Admin Portal)

  • Go to the Configuration section via the sidebar
  • Open the Webhook tab
  • Click + to add an endpoint
  • Enter the webhook URL
  • Choose events what you want
  • Click Ok to confirm

Access Your webhook logs

  • Go to the Configuration section via the sidebar
  • Open the Webhooks tab
  • Click on the webhook endpoint to see the list of events
  • Mouse up to the Request Body And Response , you will see the log detail
  • Click the resend icon to repeat event call (optional)

Accessing a specific event

You can see the details of a specific event by checking on logs. A list of properties, including: Datetime: the time of the event
  • Webhook URL: the URL used to listen to events;
  • Msg Id: idempotency Id associated with the event;
  • Webhook event: the webhook event used to understand the action triggered;
  • Response: the response code (i.e. acknowledgement of receipt);
  • Number of retries: if the event failed, the number of retries attempted;
  • A JSON snippet with the arguments sent by UniBee
If the event failed, an error response will be saved.

Webhook Event Headers

  • Content-Type: application/json.
  • Msg-id: 20250626vAcrK1750930711070, idempotency Id associated with the event.
  • Datetime: 2006-01-02T15:04:05, the time.
  • EventType: invoice.created, type of event.
  • EventId: ev20250626APADJKhuw91AOa9, idempotency key (unique identifier). This key can be used to ensure you process a webhook only once.,
  • Authorization: Bearer ${APIKey}, This can be used to verify the webhook via APIKey.

Errors and retries

Your webhook server should response with a 200 status code and success data, to acknowledge the receipt of the event. If the response is not supported as a success, UniBee will consider it as failed and try for several times, UniBee will retry up to 8 times when its time cap between retry will increase from 1 min to 7 mins under normal circumstances.