A Postman-style API reference hosted on the SwApp site: authenticate, validate accounts, collect funds, send payouts, check balances, and reconcile transaction status without leaving the domain.
The SwApp API is a JSON REST API for approved merchants and platforms that need payment services inside their own systems. It is designed around Uganda payment workflows, clear transaction references, and finance follow-up.
SwApp issues three integration credentials to an approved merchant: Client ID, API Key, and API Secret. The API Key and API Secret are used as Basic auth credentials on the token request. The returned bearer token is used on other payment API endpoints until it expires.
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/token' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Basic {{base64_api_key_api_secret}}'
Use a unique UUID for collection and payout requests. Keep it under 48 characters and store it in your system because it is the reference used for status checks and reconciliation.
import uuid
RequestId = str(uuid.uuid4())
These endpoints mirror the current SwApp Postman collection while keeping the integration reference on the SwApp site.
After creating an access token, most payment API requests use the same bearer-token headers. Endpoint cards below focus on URL, request fields, body examples, and cURL.
| Header | Value | Use |
|---|---|---|
Swapp-Client-ID | {{client_id}} | Merchant client identifier. Used on most mobile money endpoints. |
Authorization | Bearer {{access_token}} | OAuth bearer token returned by the Create Access Token request. |
Content-Type | application/json | Required when sending a JSON request body. |
Request an OAuth 2.0 bearer token before calling the mobile money endpoints. API Key and API Secret are used as the Basic auth username and password.
https://www.swapp.co.ug/apitest/mm/token| Header | Value |
|---|---|
Swapp-Client-ID | {{client_id}} |
Authorization | Basic {{base64_api_key_api_secret}} |
| Name | Type | Required | Description |
|---|---|---|---|
api_key | string | Yes | Issued to the merchant and used as the Basic auth username. |
api_secret | string | Yes | Issued to the merchant and used as the Basic auth password. |
client_id | string | Yes | Merchant client identifier sent in the Swapp-Client-ID header. |
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/token' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Basic {{base64_api_key_api_secret}}'
Confirm customer or payee identity before initiating a mobile money request.
https://www.swapp.co.ug/apitest/mm/validate| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Phone number without international code or leading zero, for example 772112233. |
Amount | integer | Optional | Transaction value. When supplied, the response can include expected charges. |
Type | enum | Optional | Use collect or payout. Defaults to collect where not supplied. |
{
"Account": "{{phone_number}}",
"Amount": 50000,
"Type": "collect"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/validate' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": 50000,
"Type": "collect"
}'
Validate a mobile money deposit account before a deposit workflow is completed.
https://www.swapp.co.ug/apitest/mm/momo_validate| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Phone number without international code or leading zero. |
Amount | integer | Optional | Transaction value used to estimate charges where applicable. |
Type | string | Yes | Use deposit for this validation path. |
{
"Account": "{{phone_number}}",
"Amount": 50000,
"Type": "deposit"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/momo_validate' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": 50000,
"Type": "deposit"
}'
Collect funds from a customer and top up the merchant account on the SwApp platform.
https://www.swapp.co.ug/apitest/mm/collect| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Customer phone number without international code or leading zero. |
Amount | integer | Yes | Transaction amount. |
RequestId | UUID string | Yes | Unique transaction reference generated by your system. Must be less than 48 characters. |
{
"Account": "{{phone_number}}",
"Amount": {{txn_amount}},
"RequestId": "{{unique_request_id}}"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/collect' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": {{txn_amount}},
"RequestId": "{{unique_request_id}}"
}'
Send money from a merchant account to a payee account.
https://www.swapp.co.ug/apitest/mm/payout| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Payee phone number without international code or leading zero. |
Amount | integer | Yes | Payout amount. |
RequestId | UUID string | Yes | Unique reference for the payout, used later for status checks. |
{
"Account": "{{phone_number}}",
"Amount": {{txn_amount}},
"RequestId": "{{unique_request_id}}"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/payout' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": {{txn_amount}},
"RequestId": "{{unique_request_id}}"
}'
Check the status of a collection, payout, or related mobile money request using the original RequestId.
https://www.swapp.co.ug/apitest/mm/getstatus| Name | Type | Required | Description |
|---|---|---|---|
RequestId | UUID string | Yes | The same unique reference used in the original transaction request. |
{
"RequestId": "{{unique_request_id}}"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/getstatus' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"RequestId": "{{unique_request_id}}"
}'
Check the balance on the default account connected to the merchant.
https://www.swapp.co.ug/apitest/mm/balanceNo JSON body fields are required for this endpoint.
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/balance' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}'
Validate an account and flat amount through the published flat validation endpoint.
https://www.swapp.co.ug/api/mm/flatvalidate| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Phone number without international code or leading zero. |
Amount | string | Yes | Flat amount to validate. |
{
"Account": "{{phone_number}}",
"Amount": "2000"
}
curl --location \
--request POST 'https://www.swapp.co.ug/api/mm/flatvalidate' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": "2000"
}'
Initiate a flat payout using account, amount, and RequestId.
https://www.swapp.co.ug/apitest/mm/flatpayout| Name | Type | Required | Description |
|---|---|---|---|
Account | string | Yes | Payee phone number without international code or leading zero. |
Amount | string | Yes | Flat payout amount. |
RequestId | UUID string | Yes | Unique reference generated by your system. |
{
"Account": "{{phone_number}}",
"Amount": "2000",
"RequestId": "{{unique_request_id}}"
}
curl --location \
--request POST 'https://www.swapp.co.ug/apitest/mm/flatpayout' \
--header 'Swapp-Client-ID: {{client_id}}' \
--header 'Authorization: Bearer {{access_token}}' \
--header 'Content-Type: application/json' \
--data '{
"Account": "{{phone_number}}",
"Amount": "2000",
"RequestId": "{{unique_request_id}}"
}'
API credentials are issued by SwApp after onboarding. Share the collection, payout, validation, or reconciliation workflow you need, and the team will confirm the right setup before credentials are issued.