Skip to main content
An activity is a single attempt to collect an ugwo. Today every activity has activity_type: "charge". An ugwo can have many activities (an abandoned bank transfer, then a successful USSD charge), and several can be open at the same time. The first to succeed pays the ugwo; any later success is a double charge. Refunds attach to the activity that collected the money, so store the successful activity’s uid alongside the ugwo’s.

Attributes

string
Unique identifier, act.XXXX.YYYYYYYYYYYYYYYYYYYYYYYY.
enum
Always charge.
object
The checkout the attempt was routed through: { uid, currency, mediums: [{ medium }] }.
object | null
The payment instrument used for this attempt, once known.
string
The PSP that handled the attempt, e.g. paystack_ng.
string | null
The PSP’s reference for this charge. Use it to find the transaction in your PSP dashboard.
enum
One of requires_action, processing, successful, failed, expired, reversed, partially_refunded, refunded. See Status.
string
ISO-8601 timestamp.
object | null
Why the attempt failed. null unless status is failed.
string
ISO-8601 timestamp.
integer | null
The amount requested from the PSP, in the smallest currency unit.
integer
The Kwugwo usage charge for this attempt, in the smallest currency unit, debited from your Kwugwo subscription balance (not from the customer’s payment).
integer
How much of this activity is committed to refunds. Rises when a refund is created and falls back if the refund fails.
integer
The amount the PSP says it is charging for this attempt, in the smallest currency unit. Usually equal to amount and often set as soon as the attempt is created, so it is not proof of payment: check status. Can differ from amount, e.g. when a customer transfers the wrong sum to a virtual account.
object | null
What the customer must do to complete this attempt, as a Next action object. Present when status is requires_action; kept afterwards with its own status of fulfilled or expired.
boolean
true when this attempt succeeded after the ugwo had already been paid by another activity. The ugwo is not affected; refund this activity to return the extra money. See ugwo.activity.double_charge_detected.

Webhook-only attributes

Activities delivered in webhooks carry two extra fields so you can find the parent payment:
string
The parent ugwo’s ID, ugw.….
string
The same parent ugwo ID, ugw.….
The Activity object

Status

When an activity ends as failed, expired or reversed, its ugwo returns to requires_ugwo and you can start a new attempt.

Double charges

If two open attempts on the same ugwo both succeed (say the customer pays the bank transfer and dials the USSD code), the first one pays the ugwo and the later one gets is_double_charge: true. The ugwo is not changed by it, and Kwugwo sends ugwo.activity.double_charge_detected. Refund the double-charged activity.