Partner account creation
POST /api/ssentezo/register
Create a sandbox organization. Used by the Ssentezo MFI integration.
This creates a user and returns a new API secret. It is not available in the playground.
Authentication
HTTP Basic, as described in Authentication. No extra scope is checked.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Basic base64(api_user_id:api_key). |
Content-Type | Yes | application/json |
Accept | No | application/json |
Body
| Field | Required | Rules | Description |
|---|---|---|---|
company_namestring |
Yes | required|unique:organizations,name|max:255 | Organization name. |
emailstring |
Yes | required|email|unique:users,email | Owner email. |
passwordstring |
Yes | required|string | Owner password. Send it only over HTTPS and do not log it. |
phonestring |
Yes | Ugandan number, unique | Owner phone. |
first_namestring |
Yes | required|string | Owner first name. |
last_namestring |
Yes | required|string | Owner last name. |
addressstring |
Yes | required|string | Organization address. |
Behavior
- Any existing API credential can call this route. The response includes a new API user and key. Store that secret once and do not log it.
- The new organization starts in SANDBOX.
- This is not the merchant self-signup page. People creating their own account use the website registration form.
Idempotency. Not supported by a dedicated header.
Rate limit. No rate limit is configured on the API.
Example request
{
"company_name": "Example Supplies Ltd",
"email": "owner@example.com",
"password": "use-a-secret-from-your-environment",
"phone": "256772123456",
"first_name": "Ada",
"last_name": "Lovelace",
"address": "Kampala"
}
Success ยท HTTP 201
{
"status": "SUCCESS",
"response": "OK",
"data": {
"USERNAME": "new-api-user-id",
"API_KEY": "returned-once",
"message": "Account was created successfully. Save the key; it is the API password."
}
}
Errors
| Status | When |
|---|---|
| 401 NO_AUTHORIZATION_HEADER | The Authorization header is missing. |
| 403 INVALID_AUTHORIZATION_HEADER | The header must start with "Basic ". |
| 403 MISSING_USER_OR_KEY | The decoded value must be api_user_id:api_key. |
| 403 INVALID_USER_OR_KEY | The API user or key was not recognized. |
| 403 ORGANIZATION_SUSPENDED | The organization user is suspended. |
| 422 | Validation failed. The account was not created. |
| 400 | The account could not be created. |
Code
curl
curl --request POST \
--url "$SSENTEZO_BASE_URL/api/ssentezo/register" \
--header "Authorization: Basic $SSENTEZO_BASIC_TOKEN" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--data '{
"company_name": "Example Supplies Ltd",
"email": "owner@example.com",
"password": "use-a-secret-from-your-environment",
"phone": "256772123456",
"first_name": "Ada",
"last_name": "Lovelace",
"address": "Kampala"
}'
php
$client = new Ssentezo\Wallet\SsentezoClient(
getenv('SSENTEZO_API_USER'),
getenv('SSENTEZO_API_KEY'),
getenv('SSENTEZO_BASE_URL')
);
$result = $client->request('POST', '/api/ssentezo/register', json_decode(<<<'JSON'
{
"company_name": "Example Supplies Ltd",
"email": "owner@example.com",
"password": "use-a-secret-from-your-environment",
"phone": "256772123456",
"first_name": "Ada",
"last_name": "Lovelace",
"address": "Kampala"
}
JSON, true));
javascript
const token = Buffer.from(process.env.SSENTEZO_API_USER + ':' + process.env.SSENTEZO_API_KEY).toString('base64');
const response = await fetch(process.env.SSENTEZO_BASE_URL + '/api/ssentezo/register', {
method: 'POST',
headers: {
Authorization: 'Basic ' + token,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"company_name": "Example Supplies Ltd",
"email": "owner@example.com",
"password": "use-a-secret-from-your-environment",
"phone": "256772123456",
"first_name": "Ada",
"last_name": "Lovelace",
"address": "Kampala"
}),
});
const payload = await response.json();
python
import base64, json, os, urllib.request
token = base64.b64encode(f"{os.environ['SSENTEZO_API_USER']}:{os.environ['SSENTEZO_API_KEY']}".encode()).decode()
request = urllib.request.Request(
os.environ['SSENTEZO_BASE_URL'] + '/api/ssentezo/register',
data=json.dumps({
"company_name": "Example Supplies Ltd",
"email": "owner@example.com",
"password": "use-a-secret-from-your-environment",
"phone": "256772123456",
"first_name": "Ada",
"last_name": "Lovelace",
"address": "Kampala"
}).encode(),
headers={'Authorization': f'Basic {token}', 'Accept': 'application/json', 'Content-Type': 'application/json'},
method='POST',
)
with urllib.request.urlopen(request, timeout=20) as response:
payload = json.load(response)
java
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(System.getenv("SSENTEZO_BASE_URL") + "/api/ssentezo/register"))
.timeout(Duration.ofSeconds(20))
.header("Authorization", "Basic " + Base64.getEncoder().encodeToString((System.getenv("SSENTEZO_API_USER") + ":" + System.getenv("SSENTEZO_API_KEY")).getBytes(StandardCharsets.UTF_8)))
.header("Accept", "application/json")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString("{\"company_name\":\"Example Supplies Ltd\",\"email\":\"owner@example.com\",\"password\":\"use-a-secret-from-your-environment\",\"phone\":\"256772123456\",\"first_name\":\"Ada\",\"last_name\":\"Lovelace\",\"address\":\"Kampala\"}"))
.build();
Set SSENTEZO_API_USER, SSENTEZO_API_KEY, and SSENTEZO_BASE_URL. SSENTEZO_BASIC_TOKEN is the base64 of user:key.
Ssentezo Developers