Authentication
Secure your API requests with API key authentication.
API Key Authentication
All API requests require authentication using your unique API key.
Include your API key in the request header for all API calls.
Security Warning
⚠ Never expose your API key publicly or commit it to version control.
Header Format
Copy
x-api-key: YOUR_API_KEY
Example Request
Copy
curl -X POST "https://makinisoftpay.com/api/v1/public/payments/initiate/" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"order_id": "13ff2edf-f777-471e-a314-596a7045ef3b",
"buyer_email": "customer@example.com",
"buyer_name": "John Doe",
"buyer_phone": "0658989629",
"amount": 1000
}'
Getting Your API Key
Sign up or log in to your Makinisoftpay dashboard
Navigate to the settings section
Rotate a new API key and copy your generated key
Store the key securely in environment variables
Best Practices
Store API keys in environment variables
Use separate keys for dev and production
Rotate keys regularly
Monitor usage for unauthorized access
Quick Start Guide
Get started with MakinisoftPay in just a few simple steps.
1
Generate API Key
Log in to your dashboard and generate your API key from the settings section.
2
Initiate Payment
Use the API endpoint below to create a payment request.
Copy
POST /api/v1/public/payments/initiate/
3
Confirm Payment
The customer receives a push notification (SSD) to authorize the payment.
Overview
Accept payments from all major Tanzanian mobile money operators.
Customers receive a push notification (SSD) on their mobile device to authorize payments.
M-Pesa
Airtel Money
Mixx by Yas
Halopesa
Create Payment
Copy
POST /api/v1/public/payments/initiate/
Headers
Copy
{
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
Request Body
Parameter
Type
Required
Description
order_id string Yes Unique transaction ID
buyer_email string Yes Payer's email
buyer_name string Yes Full name
buyer_phone string Yes Format: 07XXXXXXXX
amount number Yes Amount in TZS
webhook_url string No Callback URL
Example Request
Copy
curl -X POST "https://makinisoftpay.com/api/v1/public/payments/initiate/" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{
"order_id": "13ff2edf-f777-471e-a314-596a7045ef3b",
"buyer_email": "customer@gmail.com",
"buyer_name": "John Doe",
"buyer_phone": "0658989629",
"amount": 1000,
"webhook_url": "https://your-domain.com/webhook"
}'
Success Response
Copy
{
"status": "success",
"resultcode": "000",
"message": "Request in progress",
"order_id": "13ff2edf-f777-471e-a314-596a7045ef3b"
}
Error Response
Copy
{
"status": "error",
"message": "Invalid API Key or request payload"
}
Python Example
Copy
import requests
url = "https://makinisoftpay.com/api/v1/public/payments/initiate/"
headers = {
"Content-Type": "application/json",
"x-api-key": "YOUR_API_KEY"
}
payload = {
"order_id": "13ff2edf-f777-471e-a314-596a7045ef3b",
"buyer_email": "customer@example.com",
"buyer_name": "John Doe",
"buyer_phone": "0658989629",
"amount": 1000
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
JavaScript Example
Copy
const response = await fetch(
'https://makinisoftpay.com/api/v1/public/payments/initiate/',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({
order_id: '13ff2edf-f777-471e-a314-596a7045ef3b',
buyer_email: 'customer@example.com',
buyer_name: 'John Doe',
buyer_phone: '0658989629',
amount: 1000
})
}
);
const data = await response.json();
console.log(data);
Support
Need help? Contact:
support@makinisoftpay.com
Verifications Status
Query payment transaction status and details.
Overview
Retrieve comprehensive payment status and transaction details.
This endpoint provides payment status, reference numbers, timestamps,
and channel information.
Get Verifications Status
GET /api/v1/public/payments/verify/
Copy
x-api-key: YOUR_API_KEY
Query Param: order_id (required)
Example Request
Copy
curl -X GET "https://makinisoftpay.com/api/v1/public/payments/verify/?order_id=YOUR_ORDER_ID" \
-H "x-api-key: YOUR_API_KEY"
Success Response
Copy
{
"order_id": "8a2573da-8fb1-4046-b404-5bff2e9a4855",
"reference": "039b18c9-7bc0-4313-b8d8-2e1f1aa9ac9f",
"status": "SUCCESS",
"amount": "2800.00",
"merchant_amount": "2661.75",
"platform_fee": "68.25"
}
Response Field Descriptions
Field
Description
order_id Your unique order identifier
amount Payment amount in TZS
status Payment status (SUCCESS, PENDING, FAILED)
reference Payment reference number
merchant_amount Amount received by merchant
platform_fee Platform transaction fee
Payment Status Values
SUCCESS – Payment completed
PENDING – Awaiting confirmation
FAILED – Payment failed or cancelled
Python Example
Copy
import requests
url = "https://makinisoftpay.com/api/v1/public/payments/verify/"
headers = {
"x-api-key": "YOUR_API_KEY"
}
params = {
"order_id": "YOUR_ORDER_ID"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
JavaScript Example
Copy
const orderId = "YOUR_ORDER_ID";
const response = await fetch(
`https://makinisoftpay.com/api/v1/public/payments/verify/?order_id=${orderId}`,
{
method: "GET",
headers: {
"x-api-key": "YOUR_API_KEY"
}
}
);
const data = await response.json();
console.log(data);
Receive real-time payment notifications and automate your workflow
⚡ Real-time Notifications
Instantly receive updates when a payment is COMPLETED .
Automate order processing and customer notifications seamlessly.
🔗 Webhook Setup
Include webhook_url:
{
"order_id": "4c41955b-7f15-4e95-af92-712c7848dd76",
"amount": 1000,
"webhook_url": "https://your-domain.com/payment-webhook"
}
🔐 Secure Verification
Validate requests using:
x-api-key: YOUR_API_KEY
📦 Webhook Payload
{
"order_id": "4c41955b-7f15-4e95-af92-712c7848dd76",
"payment_status": "COMPLETED",
"reference": "89e92bc9-dda9-4774-96d5-5715d2a503d4"
}
🚀 Best Practices
✔️ Verify API key on every request
✔️ Use HTTPS endpoints only
✔️ Return 200 OK immediately
✔️ Handle duplicate webhooks safely
✔️ Process asynchronously
✔️ Log all requests