curl -X DELETE https://api.kwugwo.africa/v1/ugwo/ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY"
await fetch(`https://api.kwugwo.africa/v1/ugwo/${ugwoUid}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}` },
});
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/ugwo/{$ugwoUid}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY')],
]);
$ugwo = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
requests.delete(
f"https://api.kwugwo.africa/v1/ugwo/{ugwo_uid}",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
)
url := fmt.Sprintf("https://api.kwugwo.africa/v1/ugwo/%s", ugwoUid)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"ref": "order_4719",
"onye_nzube": { "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE", "email": "ada@example.com", "...": "..." },
"amount": 500000,
"currency": "NGN",
"status": "cancelled",
"description": "Order #4719",
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:40:10+00:00",
"checkout": {
"uid": "chk.VCvr.vBtGwathtd99FpQGIGwIAATX",
"currency": "NGN",
"mediums": [{ "medium": "bank_transfer" }, { "medium": "ussd" }]
},
"total_amount_paid": 0,
"fee": 0,
"meta": { "order_id": "4719" }
}
{
"message": "nzube.ugwo.error.invalid_status",
"code": "not_allowed",
"params": []
}
Payments (Ugwo)
Cancel an ugwo
Cancel a payment that hasn’t been paid.
DELETE
/
v1
/
ugwo
/
{ugwoUid}
curl -X DELETE https://api.kwugwo.africa/v1/ugwo/ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY"
await fetch(`https://api.kwugwo.africa/v1/ugwo/${ugwoUid}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}` },
});
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/ugwo/{$ugwoUid}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY')],
]);
$ugwo = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
requests.delete(
f"https://api.kwugwo.africa/v1/ugwo/{ugwo_uid}",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
)
url := fmt.Sprintf("https://api.kwugwo.africa/v1/ugwo/%s", ugwoUid)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"ref": "order_4719",
"onye_nzube": { "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE", "email": "ada@example.com", "...": "..." },
"amount": 500000,
"currency": "NGN",
"status": "cancelled",
"description": "Order #4719",
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:40:10+00:00",
"checkout": {
"uid": "chk.VCvr.vBtGwathtd99FpQGIGwIAATX",
"currency": "NGN",
"mediums": [{ "medium": "bank_transfer" }, { "medium": "ussd" }]
},
"total_amount_paid": 0,
"fee": 0,
"meta": { "order_id": "4719" }
}
{
"message": "nzube.ugwo.error.invalid_status",
"code": "not_allowed",
"params": []
}
Moves the ugwo to
cancelled so it can no longer be paid. Use it for
abandoned carts or orders the customer called off.
Only an ugwo in
requires_ugwo can be cancelled. While an
attempt is waiting on the customer (processing) or once paid,
cancel returns 405. To give money back after payment, create a
refund.| Current status | Result |
|---|---|
requires_ugwo | 200, now cancelled. |
processing, ugwo_successful, partially_refunded, refunded, cancelled | 405 Not Allowed. |
Path parameters
string
required
The ugwo ID,
ugw.XXXX.YYYY....Response
The Ugwo object withstatus: "cancelled".
curl -X DELETE https://api.kwugwo.africa/v1/ugwo/ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY"
await fetch(`https://api.kwugwo.africa/v1/ugwo/${ugwoUid}`, {
method: "DELETE",
headers: { Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}` },
});
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/ugwo/{$ugwoUid}");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY')],
]);
$ugwo = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
requests.delete(
f"https://api.kwugwo.africa/v1/ugwo/{ugwo_uid}",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
)
url := fmt.Sprintf("https://api.kwugwo.africa/v1/ugwo/%s", ugwoUid)
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"ref": "order_4719",
"onye_nzube": { "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE", "email": "ada@example.com", "...": "..." },
"amount": 500000,
"currency": "NGN",
"status": "cancelled",
"description": "Order #4719",
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:40:10+00:00",
"checkout": {
"uid": "chk.VCvr.vBtGwathtd99FpQGIGwIAATX",
"currency": "NGN",
"mediums": [{ "medium": "bank_transfer" }, { "medium": "ussd" }]
},
"total_amount_paid": 0,
"fee": 0,
"meta": { "order_id": "4719" }
}
{
"message": "nzube.ugwo.error.invalid_status",
"code": "not_allowed",
"params": []
}