Frequently Asked Questions (FAQs)
Common questions and answers about the Salami Gateway API.
Table of Contents
- General Questions
- Authentication & Tokens
- Payments
- SMS
- eTims
- Troubleshooting
- Billing & Pricing
General Questions
What is Salami Gateway?
Salami Gateway is a unified API platform for payments, SMS, and eTims (tax compliance) integrations in Kenya and East Africa. It provides a single interface to multiple payment providers, SMS services, and KRA's eTims system.
Which countries are supported?
Currently supported:
- Kenya - Full support (Payments, SMS, eTims)
- Uganda - Payments and SMS
- Tanzania - Payments and SMS
- Rwanda - Payments and SMS
- Ghana - Payments and SMS
- DRC - Limited payments support
Is there a test/sandbox environment?
Yes! All payment apps and SMS apps support test mode. You can:
- Use sandbox credentials provided by payment providers
- Test without real money
- Simulate transactions
- Test error scenarios
Note: eTims does not have a sandbox - it uses real KRA credentials.
What programming languages are supported?
Salami Gateway is a REST API that works with any programming language. We provide:
How do I get support?
Authentication & Tokens
How do I create an API token?
- Log in to your Salami dashboard
- Navigate to Account → API Tokens
- Click "Add New Token"
- Select the scopes (permissions) you need
- Optionally set an expiration date
- Click "Save" and copy the token (shown only once!)
I lost my API token. What should I do?
API tokens are only shown once for security. If you lose it:
- Revoke the old token (if still active)
- Create a new token with the same permissions
- Update your application with the new token
What are API scopes?
Scopes control what an API token can access:
payments:read - View payment data
payments:write - Create/modify payments
sms:read - View SMS messages
sms:write - Send SMS
etims:read - View eTims data
etims:write - Submit to eTims
Use the principle of least privilege - only grant necessary scopes.
Can I use the same token for multiple applications?
While possible, it's not recommended. Best practice:
- Create separate tokens for each application
- Use descriptive names ("Production Server", "Mobile App")
- Revoke compromised tokens without affecting others
- Track usage per application
How long do tokens last?
- Default: No expiration
- Custom: Set your own expiration date (1 day to 10 years)
- Revoked: Immediately invalid
Recommendation: Rotate tokens every 90 days for security.
What happens if my token is compromised?
- Immediately revoke the token in your dashboard
- Review recent API activity for suspicious calls
- Create a new token with fresh credentials
- Update your application with the new token
- Investigate how the token was exposed and fix the vulnerability
Payments
Which payment providers are supported?
Kenya:
- M-Pesa (C2B, B2B, B2C, Express/STK)
- Airtel Money
- Equity Bank
- Pesalink
- Kopokopo
Uganda:
- MTN Mobile Money
- Airtel Money
Tanzania:
- M-Pesa
- Tigo Pesa
- Airtel Money
Rwanda:
Ghana:
- MTN Mobile Money
- Airtel Money
Global:
What's the difference between C2B, B2B, and B2C?
- C2B (Customer to Business): Customers pay you via PayBill/Till
- B2B (Business to Business): Transfer money to another business
- B2C (Business to Customer): Send money to customers (e.g., salaries, refunds)
How does STK Push work?
STK Push (Lipa Na M-Pesa Online) triggers a payment prompt on the customer's phone:
- You call the
requestPayment endpoint
- Customer receives M-Pesa PIN prompt on their phone
- Customer enters PIN to complete payment
- You receive callback with payment result
- Transaction is reconciled automatically
Timeout: 30 seconds if customer doesn't respond
Why did my payment request fail?
Common reasons:
- Invalid phone number - Use international format (+254...)
- Insufficient balance - Customer doesn't have enough money
- Wrong PIN - Customer entered incorrect PIN
- Timeout - Customer didn't respond within 30 seconds
- Network error - Temporary connectivity issue
- Daily limit exceeded - Customer hit daily transaction limit
Check the response_description in the API response for details.
How do I know when a payment is completed?
Two methods:
1. Webhooks (Recommended)
- Configure callback URLs in your payment app
- Salami sends a POST request when payment completes
- Process the callback and update your system
2. Polling
- Call
checkPaymentRequestStatus periodically
- Not recommended due to rate limits
- Use only for testing
Can I reverse/refund a payment?
M-Pesa: Yes, within 24 hours using the reverseTransaction endpoint.
Other providers: Limited support. Contact support for assistance.
What are the transaction limits?
Limits vary by provider and account type:
M-Pesa Kenya (typical):
- Minimum: KES 1
- Maximum per transaction: KES 150,000 (C2B), KES 70,000 (personal)
- Daily limit: KES 500,000
Airtel Money:
- Minimum: KES 10
- Maximum: KES 140,000
- Daily limit: KES 140,000
Contact your payment provider to increase limits.
How long do transactions take to process?
- STK Push: 1-30 seconds
- C2B PayBill: Instant (real-time)
- B2C: 1-5 minutes
- B2B: 1-10 minutes
- Bank transfers: Minutes to hours
What are the transaction fees?
Fees vary by provider and are typically deducted from your account balance:
M-Pesa Kenya (approximate):
- C2B: Free
- B2C: KES 10 - 105 (based on amount)
- STK Push: Free
Airtel Money:
- Similar to M-Pesa
- Slightly lower in some tiers
Check with your provider for exact fee structure.
SMS
How do I send SMS?
- Create an SMS app in your dashboard
- Get an API token with
sms:write scope
- Call the
/api/sms/apps/{app_id}/send endpoint
See the SMS API documentation for details.
Can I use my own phone to send SMS?
Yes! With the Salami SMS Gateway Android app:
- Install the app on your Android phone
- Configure it with your SMS app credentials
- The app uses your SIM card to send/receive SMS
- No per-message costs (uses your carrier plan)
Benefits:
- Very low cost (use existing SIM plan)
- Full two-way messaging
- Call log tracking
Drawbacks:
- Phone must be online
- Battery consumption
- Limited to one phone's sending capacity
How much does SMS cost?
Using SMS providers (coming soon):
- Kenya: KES 0.80 - 1.50 per SMS
- Uganda: UGX 100 - 200 per SMS
- Ghana: GHS 0.05 - 0.10 per SMS
Using Android app:
- Uses your SIM card airtime/bundle
- Typically KES 0.50 - 1.00 per SMS in Kenya
Can I receive SMS replies?
Yes! Configure your SMS app to:
- Enable two-way messaging
- Set up callback URLs
- Process incoming messages via API
How long can an SMS be?
- Single part: 160 characters (GSM) or 70 characters (Unicode)
- Multi-part: Automatically split into segments of 153/67 characters
Cost: You pay for each part. A 200-character message = 2 SMS.
Why aren't my messages being delivered?
Common issues:
- Invalid phone number - Verify format
- Phone switched off - Message will retry
- Number doesn't exist - Remove from list
- Blocked by recipient - They opted out
- Network issues - Temporary, will retry
Check message status via the outbox endpoint.
Can I schedule SMS for later?
Yes! Use the scheduled_at parameter when sending:
{
"to": "+254712345678",
"message": "Your message",
"scheduled_at": "2024-01-25T10:00:00Z"
}
How do I send bulk SMS?
Use the /api/sms/groups/{app_id}/send endpoint with a list of recipients:
{
"recipients": ["+254712345678", "+254723456789"],
"message": "Bulk message"
}
Best practices:
- Send in batches of 100-500
- Space out large campaigns
- Monitor delivery rates
- Remove invalid numbers
eTims
What is eTims?
eTims (electronic Tax Invoice Management System) is KRA's system for electronic tax invoices in Kenya. All VAT-registered businesses must use eTims-compliant systems.
Who needs to use eTims?
- VAT-registered businesses in Kenya
- Businesses making taxable supplies
- Required by KRA for tax compliance
Penalty for non-compliance: Up to KES 1 million or 2 years imprisonment.
How do I get started with eTims?
- Register with KRA - Get your device credentials (BHFID, serial number)
- Configure in Salami - Enter your KRA credentials
- Initialize device - Call the initialize endpoint
- Register items - Add your products/services
- Start submitting - Submit sales to KRA
See the Getting Started guide.
Is there a test environment for eTims?
No. eTims only works with real KRA production credentials. There is no sandbox.
For testing:
- Use small transaction amounts
- Test with real (but low-value) sales
- Keep test data organized
- You can cancel test invoices if needed
How often should I submit sales to KRA?
Within 24 hours of the sale. Best practice:
- Submit immediately after sale (recommended)
- Batch submit every few hours
- Never delay more than 24 hours
Can I edit or delete a submitted sale?
No. Once submitted to KRA, you cannot edit. You can:
- Cancel the sale (if needed)
- Issue credit note for corrections
- Submit a corrected invoice
Always verify data before submission!
What happens if I submit incorrect data?
- Before submission: Edit freely
- After submission:
- Cancel the invoice
- Issue a credit note
- Submit correct invoice
- Document the reason
How do I handle returns and refunds?
- Cancel original sale via the API
- Issue credit note (if required)
- Specify refund type:
- Cash refund
- Credit note
- No refund
What's a CU Invoice Number?
CU (Control Unit) Invoice Number is the unique identifier assigned by KRA to your invoice. It's returned when you submit a sale and must be shown on the printed receipt.
Format: CU2024123-001
Can I integrate my POS with eTims?
Yes! Salami Gateway provides a complete eTims API for POS integration:
- Submit sales in real-time
- Manage inventory
- Generate compliant invoices
- Track tax obligations
What items need to be registered?
All products and services you sell must be registered with eTims before first use. Include:
- Item code (unique identifier)
- Item name
- Tax classification
- Unit price
- Package and quantity units
Troubleshooting
I'm getting "Unauthorized" errors
Possible causes:
- No API token - Include
Authorization: Bearer YOUR_TOKEN header
- Invalid token - Token may be revoked or expired
- Wrong token - Using token from different tenant
Solution: Verify your token in the dashboard and ensure it's active.
I'm getting "Forbidden" errors (403)
Cause: Your token doesn't have the required scope.
Solution:
- Check which endpoint you're calling
- Verify the required scope (see API docs)
- Create a new token with correct scopes
I'm getting "Rate limit exceeded" errors
Cause: You've exceeded 200 requests per minute.
Solution:
- Implement exponential backoff
- Cache frequently accessed data
- Use webhooks instead of polling
- Contact support for higher limits
My webhook isn't receiving callbacks
Checklist:
- ✅ Webhook URL is publicly accessible (not localhost)
- ✅ Webhook URL uses HTTPS (not HTTP)
- ✅ Server is responding with 200 OK
- ✅ Firewall allows incoming requests
- ✅ URL is correctly configured in app settings
Testing: Use a service like webhook.site to verify callbacks are sent.
Transactions are showing as "pending" for too long
Normal duration:
- STK Push: 30 seconds
- C2B: Instant
- B2C: 5 minutes
If stuck longer:
- Check transaction status with provider
- Review error logs
- Contact payment provider
- If 24+ hours, contact support
How do I debug API issues?
- Check response - Read the
message and error fields
- Review logs - Check your application logs
- Test with cURL - Isolate the issue
- Verify credentials - Ensure API token is valid
- Check status page - https://status.salami.dgl.co.ke
- Contact support - If issue persists
Billing & Pricing
How am I charged for using Salami Gateway?
Platform Fees:
- Free tier: 100 transactions/month
- Starter: KES 2,000/month (1,000 transactions)
- Business: KES 5,000/month (5,000 transactions)
- Enterprise: Custom pricing
Provider Fees:
- M-Pesa: Charged by Safaricom
- Airtel: Charged by Airtel
- SMS: Charged by provider or your SIM plan
Can I try Salami Gateway for free?
Yes! Free tier includes:
- 100 transactions/month
- All features
- Full API access
- Community support
Perfect for testing and small projects.
What payment methods do you accept?
- M-Pesa
- Bank transfer
- Credit/Debit card (coming soon)
Do you offer volume discounts?
Yes! Contact sales@dgl.co.ke for:
- High-volume discounts
- Enterprise plans
- Custom pricing
Can I cancel anytime?
Yes! No long-term contracts:
- Cancel anytime from dashboard
- Pro-rated refunds (if applicable)
- Export your data before canceling
Still have questions? Email us at support@dgl.co.ke
Back to Documentation Home