Hey! These docs are for version 1.0, which is no longer officially supported. Click here for the latest version, 2.0!

Webhooks

Webhooks are a quick way to keep track of event.

Webhooks are used as a messaging channel, to keep line of business systems synchronized with events inside Upodi. A webhook cannot be used as a reliable state of an object or action. The webhook should be used for event notification in conjunction with the API.

Upodi sends webhooks to any public available webserver as HTTP POST. You can specify multiple endpoints in the Upodi application.

Upon an event, Upodi will trigger a webhook and try to send this notification to the endpoint(s). Timeout is set to 5 seconds. The webhook response is not captured by Upodi. It is a simple fire and forget event.

Summarized:

  • Enable a public available web endpoint using HTTP (port 80) or HTTPS (port 443).
  • Your endpoint must be live and capture the event within 5 seconds.
  • Upodi do not catch any response code.
  • Method is POST.
  • "Signature" will correspond to the authenticity token, and can be used to verify the source.

Webhook body
A webhook holds various information and details. Please make a sample to monitor the response formats.

This is an example of a webhook body (customer, create event):

{
  "ID" : "f07b8521-4421-4de6-96a5-178cf498cfef",
  "Time" : 131516890300860922,
  "Signature" : YTYxNWEzMdItZTBgg5i00YWE4LTk5tu6rh2JiZmEyODk5OGMz,
  "Action" :"create",
  "Issuer" : {
    "Url" : "/Customer/create/0ea627de-158e-48b1-bcbb-7fe6058d191c",
    "Identifier":"0ea627de-158e-48b1-bcbb-7fe6058d191c"
  },
  "Data" : null,
  "Type" : 
  "Customer"
}

📘

Need to test a webhook?

Services like Webhook Site enable quick test of the webhook calls from Upodi. Setup a Webhook.site endpoint and add the URL to the Upodi webhook.

Events
The followings events are sent from Upodi, to endpoint configured under webhooks.

Object

Event

Description

Customer

create

Occurs when a customer is created. Payload is id of the newly created customer.

update

Occurs when a customer is updated. Payload is id of the updated customer.

delete

Occurs when a customer is deleted. Payload is the id of the deleted customer.

Subscription

create

Occurs when a subscription is created. Payload is id of the newly created subscription.

update

Occurs when a subscription is updated. Payload is id of the updated subscription.

delete

Occurs when a subscription is deleted. Payload is the id of the deleted subscription.

cancel

Occurs when a subscription is cancelled.

activated

Occurs when a subscription is activated.

renewing

Occurs when a subscription is set to renewing state (not subject for evergreen).

renewed

Occurs when a subscription has completed a renewal event (not subject for evergreen).

ended

Occurs when a subscription has ended.

hold

Occurs when a subscription is put on hold.

expire

Occurs when a subscription has expired.

Invoice

create

Occurs when an invoice is created. Payload is id of the newly created invoice.

update

Occurs when an invoice is updated. Payload is id of the updated invoice.

delete

Occurs when an invoice is deleted. Payload is the id of the deleted invoice.

paid

Occurs when an invoice is paid.

Transaction

create

Occurs when a transaction is created. Occurs for each transaction also during dunning, each transaction may be declined, completed etc.