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",
"status": "cancelled",
"amount": 500000,
"currency": "NGN"
}
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "Conflict",
"status": 409,
"detail": "ugwo.error.cannot_cancel"
}
Payments (Ugwo)
Cancel an ugwo
Cancel an unpaid payment request.
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",
"status": "cancelled",
"amount": 500000,
"currency": "NGN"
}
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "Conflict",
"status": 409,
"detail": "ugwo.error.cannot_cancel"
}
Moves the ugwo to the
cancelled status. Use this to close out
abandoned carts or orders the customer aborted.
An ugwo can only be cancelled while it is in
requires_ugwo.
Once any activity has been started against it (and certainly once
it has been paid), the cancel call returns an error. There are no
refunds via cancel; refunds are handled separately.| Current status | Result |
|---|---|
requires_ugwo | Transitions to cancelled. |
processing / ugwo_successful / refunded / partially_refunded / cancelled | 409 Conflict. |
Path parameters
The ugwo ID,
ugw.XXXX.YYYY....Response
Returns the cancelled ugwo 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",
"status": "cancelled",
"amount": 500000,
"currency": "NGN"
}
{
"type": "https://tools.ietf.org/html/rfc2616#section-10",
"title": "Conflict",
"status": 409,
"detail": "ugwo.error.cannot_cancel"
}
⌘I

