utility_purchase.status_changed
Sent when an airtime or data purchase moves to a new status, such as delivered, failed or refunded. Answer with any 2xx within 10 seconds. Anything else, a timeout or a redirect is retried up to 6 times over about a day. Events can arrive out of order, so compare statuses rather than trusting arrival order.
utility_purchase.status_changedWebhookWebhook-IdstringrequiredThe event id. The same event can arrive more than once; use this to ignore repeats.
Webhook-TimestampstringrequiredUnix seconds when this attempt was signed. Reject a delivery older than 5 minutes.
Webhook-Signaturestringrequiredv1, then a comma, then the base64 HMAC-SHA256 of "{Webhook-Id}.{Webhook-Timestamp}.{raw body}" keyed with your endpoint's signing secret. Compare in constant time.
application/jsonidstringrequiredThe event id, the same as the Webhook-Id header.
typestringrequiredcreatedAtstring<date-time>requiredWhen the change happened.
dataUtilityPurchaserequiredThe purchase as it stood when the event was sent. The beneficiary's number and the payer are not carried, and other fields the event did not carry are left out, so fetch the purchase by reference when you need the full record.
Show propertiesHide properties
referencestringrequiredThe reference you chose.
statusstringrequiredWhere the purchase stands, reported as it is: accepted, awaiting_payment, vending, delivered, failed, refunding, refunded, refund_failed or outcome_unknown. delivered, failed and refunded are final. outcome_unknown and refund_failed are resolved by iSmartPay: do not buy again with a new reference.
productobjectShow propertiesHide properties
idstringcategorystringnetworkstringnamestringbeneficiaryobjectShow propertiesHide properties
msisdnstringamountstringThe amount bought. A decimal string in major units.
currencystringThree-letter currency code. Only GHS is sold.
feestringThe fee charged. Left out when none was recorded. A decimal string in major units.
grossstringThe amount plus the fee. Left out when no fee was recorded. A decimal string in major units.
fundingobjectShow propertiesHide properties
typestringwalletcollectionpayerobjectShow propertiesHide properties
providerstringmsisdnstringfailureReasonstringWhy the purchase failed, for example vend_failed or insufficient_balance. Left out otherwise.
createdAtstring<date-time>Received. Any 2xx stops retries.