data has the same fields as the corresponding API object, with the
additions noted below.
Which events to handle
Several events can describe the same change: the broad
*.updated
event, plus a specific one such as *.successful. Run business logic
on the specific event and treat *.updated as an audit feed.
Deliveries can arrive out of order; decide based on data.status,
not arrival order.All events
Ugwo events
data is an Ugwo object including
lastest_ugwo_activity (spelled with the extra t).
ugwo.successful
ugwo.updated, changed_fields holds the previous values, e.g.
{ "status": "processing", "total_amount_paid": 0 }.
Activity events
data is an Activity object plus two
fields pointing at its parent payment:
string
The parent ugwo ID.
string
The parent ugwo ID (same value).
ugwo.activity.updated
Double charge detected
Same payload, withis_double_charge: true and status: "successful".
The customer paid an ugwo that was already paid; its status doesn’t
change. Refund this activity.
Next action events
data is a Next action object. It doesn’t
reference its activity, so match it by the next_action.uid you saw on
the activity, or re-fetch the activity you’re tracking.
ugwo.activity.next_action.created
Refund events
data is a Refund object. Its ugwo_activity also
carries ugwo_uid and ugwo. See Refund webhooks
for handling.
Customer events
data is a Customer object, with
latest_ugwo_activity as an activity ID.
nzube.onye.created