curl https://api.kwugwo.africa/v1/onye \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"meta": { "source": "shopify" }
}'
const onye = await fetch("https://api.kwugwo.africa/v1/onye", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "ada@example.com",
ref: "user_8821",
first_name: "Ada",
last_name: "Okeke",
}),
}).then(r => r.json());
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/onye");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ada@example.com',
'ref' => 'user_8821',
'first_name' => 'Ada',
'last_name' => 'Okeke',
]),
]);
$onye = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
onye = requests.post(
"https://api.kwugwo.africa/v1/onye",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
json={
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
},
).json()
body, _ := json.Marshal(map[string]any{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
})
req, _ := http.NewRequest("POST", "https://api.kwugwo.africa/v1/onye", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"email": "ada@example.com",
"first_name": "Ada",
"last_name": "Okeke",
"nzube_ref": "user_8821",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:14:22+00:00",
"meta": { "source": "shopify" },
"total_successful_activities": 0,
"total_failed_activities": 0,
"latest_ugwo_activity": null
}
{
"message": "nzube.onye.error.already_exists",
"code": "already_exists",
"params": []
}
Customers (Onye)
Create a customer
Create a customer record you can attach payments to.
POST
/
v1
/
onye
curl https://api.kwugwo.africa/v1/onye \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"meta": { "source": "shopify" }
}'
const onye = await fetch("https://api.kwugwo.africa/v1/onye", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "ada@example.com",
ref: "user_8821",
first_name: "Ada",
last_name: "Okeke",
}),
}).then(r => r.json());
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/onye");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ada@example.com',
'ref' => 'user_8821',
'first_name' => 'Ada',
'last_name' => 'Okeke',
]),
]);
$onye = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
onye = requests.post(
"https://api.kwugwo.africa/v1/onye",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
json={
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
},
).json()
body, _ := json.Marshal(map[string]any{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
})
req, _ := http.NewRequest("POST", "https://api.kwugwo.africa/v1/onye", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"email": "ada@example.com",
"first_name": "Ada",
"last_name": "Okeke",
"nzube_ref": "user_8821",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:14:22+00:00",
"meta": { "source": "shopify" },
"total_successful_activities": 0,
"total_failed_activities": 0,
"latest_ugwo_activity": null
}
{
"message": "nzube.onye.error.already_exists",
"code": "already_exists",
"params": []
}
Creates a customer. Pass its
uid as onye when
you create an ugwo.
You don’t have to create customers up front. Passing
onye_email on
Create an ugwo finds or creates the customer for you.Body parameters
string
required
Email address. Lowercased on save. Unique per workspace: a second
customer with the same email returns
409.string
Your reference, up to 150 characters, typically your user ID.
Returned as
nzube_ref. Case-sensitive.string
Up to 100 characters. Title-cased on save.
string
Up to 100 characters. Title-cased on save.
object
Optional. If you send it, every field is required; use
"" for
address2 when you have no second line.object
Up to 50
{ "key": "value" } pairs; string values up to 255
characters.Response
The new Customer object.Errors
| Status | Cause |
|---|---|
409 | A customer with this email already exists. |
422 | Missing or invalid email, a field too long, an incomplete billing_address, or malformed meta. |
curl https://api.kwugwo.africa/v1/onye \
-H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"meta": { "source": "shopify" }
}'
const onye = await fetch("https://api.kwugwo.africa/v1/onye", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
email: "ada@example.com",
ref: "user_8821",
first_name: "Ada",
last_name: "Okeke",
}),
}).then(r => r.json());
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/onye");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('KWUGWO_SECRET_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'email' => 'ada@example.com',
'ref' => 'user_8821',
'first_name' => 'Ada',
'last_name' => 'Okeke',
]),
]);
$onye = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests
onye = requests.post(
"https://api.kwugwo.africa/v1/onye",
headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
json={
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
},
).json()
body, _ := json.Marshal(map[string]any{
"email": "ada@example.com",
"ref": "user_8821",
"first_name": "Ada",
"last_name": "Okeke",
})
req, _ := http.NewRequest("POST", "https://api.kwugwo.africa/v1/onye", bytes.NewReader(body))
req.Header.Set("Authorization", "Bearer "+os.Getenv("KWUGWO_SECRET_KEY"))
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
{
"uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
"email": "ada@example.com",
"first_name": "Ada",
"last_name": "Okeke",
"nzube_ref": "user_8821",
"billing_address": {
"address": "12 Marina",
"address2": "",
"city": "Lagos",
"state": "Lagos",
"zip": "101001",
"country": "NG"
},
"created_at": "2026-05-15T09:14:22+00:00",
"updated_at": "2026-05-15T09:14:22+00:00",
"meta": { "source": "shopify" },
"total_successful_activities": 0,
"total_failed_activities": 0,
"latest_ugwo_activity": null
}
{
"message": "nzube.onye.error.already_exists",
"code": "already_exists",
"params": []
}