Ssentezo Developers
Sandbox and production use the same API host. The organization status, SANDBOX or LIVE, is the environment. This portal does not simulate a successful payment when a call fails.

Bank transfers

POST /api/push-to-bank/request-bank-transfer

Request a transfer from the wallet to a bank account.

This debits the wallet and creates a bank transfer. The playground does not send it.

Authentication

HTTP Basic, as described in Authentication. No extra scope is checked.

Headers

HeaderRequiredDescription
AuthorizationYesBasic base64(api_user_id:api_key).
Content-TypeYesapplication/json
AcceptNoapplication/json

Body

FieldRequiredRulesDescription
external_reference
string
Yes required|unique:api_requests,external_id Your transfer reference.
bank_id
integer
Yes required|integer|exists:banks,id Bank id from Get banks.
account_name
string
Yes required|min:2|max:255 Account name.
account_number
string
Yes required|numeric Digits only.
amount
number
Yes required|numeric|min:2500|max:50000000 Amount in UGX.
reason
string
No nullable|min:2|max:255 Transfer narration.

Behavior

  • Amount must be from UGX 2,500 to UGX 50,000,000.
  • The fixed fee follows the organization push-to-bank policy. The published bands are 5,000; 6,000; 9,000; 13,500; and 16,500 UGX.
  • The field name is external_reference, with an underscore. This request does not store success or failure callback URLs.
  • PENDING means the request was accepted. Confirm with the bank status endpoint.

Idempotency. external_reference must be unique.

Rate limit. No rate limit is configured on the API.

Example request

{
    "external_reference": "bank-1001",
    "bank_id": 1,
    "account_name": "Ada Lovelace",
    "account_number": "1234567890",
    "amount": 250000,
    "reason": "Supplier settlement"
}

Success ยท HTTP 200

{
    "response": "OK",
    "data": {
        "transactionStatus": "PENDING",
        "ssentezoWalletReference": "generated-uuid",
        "externalReference": "bank-1001"
    }
}

Errors

StatusWhen
401 NO_AUTHORIZATION_HEADERThe Authorization header is missing.
403 INVALID_AUTHORIZATION_HEADERThe header must start with "Basic ".
403 MISSING_USER_OR_KEYThe decoded value must be api_user_id:api_key.
403 INVALID_USER_OR_KEYThe API user or key was not recognized.
403 ORGANIZATION_SUSPENDEDThe organization user is suspended.
422Validation failed.
400The transfer was rejected or could not be created.

Code

curl

curl --request POST \
  --url "$SSENTEZO_BASE_URL/api/push-to-bank/request-bank-transfer" \
  --header "Authorization: Basic $SSENTEZO_BASIC_TOKEN" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '{
    "external_reference": "bank-1001",
    "bank_id": 1,
    "account_name": "Ada Lovelace",
    "account_number": "1234567890",
    "amount": 250000,
    "reason": "Supplier settlement"
}'

php

$client = new Ssentezo\Wallet\SsentezoClient(
    getenv('SSENTEZO_API_USER'),
    getenv('SSENTEZO_API_KEY'),
    getenv('SSENTEZO_BASE_URL')
);

$result = $client->request('POST', '/api/push-to-bank/request-bank-transfer', json_decode(<<<'JSON'
{
    "external_reference": "bank-1001",
    "bank_id": 1,
    "account_name": "Ada Lovelace",
    "account_number": "1234567890",
    "amount": 250000,
    "reason": "Supplier settlement"
}
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/push-to-bank/request-bank-transfer', {
  method: 'POST',
  headers: {
    Authorization: 'Basic ' + token,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "external_reference": "bank-1001",
    "bank_id": 1,
    "account_name": "Ada Lovelace",
    "account_number": "1234567890",
    "amount": 250000,
    "reason": "Supplier settlement"
}),
});
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/push-to-bank/request-bank-transfer',
    data=json.dumps({
    "external_reference": "bank-1001",
    "bank_id": 1,
    "account_name": "Ada Lovelace",
    "account_number": "1234567890",
    "amount": 250000,
    "reason": "Supplier settlement"
}).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/push-to-bank/request-bank-transfer"))
    .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("{\"external_reference\":\"bank-1001\",\"bank_id\":1,\"account_name\":\"Ada Lovelace\",\"account_number\":\"1234567890\",\"amount\":250000,\"reason\":\"Supplier settlement\"}"))
    .build();

Set SSENTEZO_API_USER, SSENTEZO_API_KEY, and SSENTEZO_BASE_URL. SSENTEZO_BASIC_TOKEN is the base64 of user:key.