Skip to main content
POST
/
v1
/
ugwo
curl https://api.kwugwo.africa/v1/ugwo \
  -H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500000,
    "currency": "NGN",
    "ref": "order_4719",
    "description": "Order #4719",
    "onye": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    "meta": { "order_id": "4719", "channel": "web" }
  }'
const res = await fetch("https://api.kwugwo.africa/v1/ugwo", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    amount: 500000,
    currency: "NGN",
    ref: "order_4719",
    description: "Order #4719",
    onye: "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    meta: { order_id: "4719", channel: "web" },
  }),
});
const ugwo = await res.json();
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/ugwo");
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([
        'amount'      => 500000,
        'currency'    => 'NGN',
        'ref'         => 'order_4719',
        'description' => 'Order #4719',
        'onye'        => 'ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE',
        'meta'        => ['order_id' => '4719', 'channel' => 'web'],
    ]),
]);
$ugwo = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests

ugwo = requests.post(
    "https://api.kwugwo.africa/v1/ugwo",
    headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
    json={
        "amount": 500000,
        "currency": "NGN",
        "ref": "order_4719",
        "description": "Order #4719",
        "onye": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
        "meta": {"order_id": "4719", "channel": "web"},
    },
).json()
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "amount":      500000,
        "currency":    "NGN",
        "ref":         "order_4719",
        "description": "Order #4719",
        "onye":        "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
        "meta":        map[string]string{"order_id": "4719", "channel": "web"},
    })

    req, _ := http.NewRequest("POST", "https://api.kwugwo.africa/v1/ugwo", 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()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}
{
  "uid": "ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
  "amount": 500000,
  "currency": "NGN",
  "status": "requires_ugwo",
  "ref": "order_4719",
  "description": "Order #4719",
  "meta": { "order_id": "4719", "channel": "web" },
  "onye": {
    "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Okeke"
  },
  "checkout": null,
  "created_at": "2026-05-15T09:14:22+00:00"
}
{
  "title": "Validation Failed",
  "status": 422,
  "violations": [
    { "propertyPath": "amount", "title": "The amount must be an integer." }
  ]
}
Creates a payment request (an ugwo) on the workspace that owns your secret key. The ugwo starts in the requires_ugwo status; running a charge activity against it moves it through the rest of its lifecycle.

Body parameters

amount
integer
required
Amount to charge, in the smallest currency unit (kobo for NGN, pesewas for GHS, cents for USD).
currency
string
required
ISO-4217 currency code. Must be a supported currency and must be enabled on at least one of your PSPs.
onye
string
ID of an existing customer (ony.…). When set, the ugwo is attached to that customer and the merchant dashboard groups it under their record.If onye is omitted, the workspace (nzube) must have a default payment email configured in its settings; otherwise the request fails with 422.
onye_email
string
Email address used to resolve the customer when onye is not provided. Must be a valid email. If an onye with this email already exists on the workspace, that onye is attached to the ugwo; otherwise a new onye is created with this email and attached.Ignored when onye is provided. If neither onye nor onye_email is provided, the workspace’s default payment email is used (see onye above).
ref
string
Your own reference (max 150 chars), typically an order number or invoice ID. Echoed back on the ugwo and on webhook deliveries.Case-sensitive. "Id" and "id" are stored and looked up as distinct values.
description
string
Human-readable description (max 150 chars) shown to the customer on the hosted checkout. Must not contain newline characters.
checkout
string
ID of a checkout (chk.…). When set, the ugwo is pinned to this checkout and Kwugwo’s automatic checkout routing is bypassed; the workspace’s routing rules are ignored for this ugwo.
meta
object
Free-form { string: string } map for your own tagging. Stored verbatim and surfaced on the dashboard. Not shown to the customer.

Response

uid
string
The new ugwo’s ID (ugw.…). Persist this on your order.
amount
integer
Amount in smallest currency unit.
currency
string
ISO-4217 code.
status
string
Always requires_ugwo for a freshly created ugwo.
ref
string | null
Your reference, if you sent one.
description
string | null
Description, if you sent one.
meta
object
Echoed metadata.
onye
object | null
The attached customer, if any (null otherwise).
checkout
object | null
The attached checkout, if any.
created_at
string
ISO-8601 timestamp.
curl https://api.kwugwo.africa/v1/ugwo \
  -H "Authorization: Bearer $KWUGWO_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 500000,
    "currency": "NGN",
    "ref": "order_4719",
    "description": "Order #4719",
    "onye": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    "meta": { "order_id": "4719", "channel": "web" }
  }'
const res = await fetch("https://api.kwugwo.africa/v1/ugwo", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KWUGWO_SECRET_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    amount: 500000,
    currency: "NGN",
    ref: "order_4719",
    description: "Order #4719",
    onye: "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    meta: { order_id: "4719", channel: "web" },
  }),
});
const ugwo = await res.json();
<?php
$ch = curl_init("https://api.kwugwo.africa/v1/ugwo");
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([
        'amount'      => 500000,
        'currency'    => 'NGN',
        'ref'         => 'order_4719',
        'description' => 'Order #4719',
        'onye'        => 'ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE',
        'meta'        => ['order_id' => '4719', 'channel' => 'web'],
    ]),
]);
$ugwo = json_decode(curl_exec($ch), true);
curl_close($ch);
import os, requests

ugwo = requests.post(
    "https://api.kwugwo.africa/v1/ugwo",
    headers={"Authorization": f"Bearer {os.environ['KWUGWO_SECRET_KEY']}"},
    json={
        "amount": 500000,
        "currency": "NGN",
        "ref": "order_4719",
        "description": "Order #4719",
        "onye": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
        "meta": {"order_id": "4719", "channel": "web"},
    },
).json()
package main

import (
    "bytes"
    "encoding/json"
    "fmt"
    "io"
    "net/http"
    "os"
)

func main() {
    body, _ := json.Marshal(map[string]any{
        "amount":      500000,
        "currency":    "NGN",
        "ref":         "order_4719",
        "description": "Order #4719",
        "onye":        "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
        "meta":        map[string]string{"order_id": "4719", "channel": "web"},
    })

    req, _ := http.NewRequest("POST", "https://api.kwugwo.africa/v1/ugwo", 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()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out))
}
{
  "uid": "ugw.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
  "amount": 500000,
  "currency": "NGN",
  "status": "requires_ugwo",
  "ref": "order_4719",
  "description": "Order #4719",
  "meta": { "order_id": "4719", "channel": "web" },
  "onye": {
    "uid": "ony.VCvr.7K2qPmRtV9xLnQ8sD1cYwHfE",
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Okeke"
  },
  "checkout": null,
  "created_at": "2026-05-15T09:14:22+00:00"
}
{
  "title": "Validation Failed",
  "status": 422,
  "violations": [
    { "propertyPath": "amount", "title": "The amount must be an integer." }
  ]
}