Offline Terminal Behaviour and Queued Transactions
Paystack Terminal requires internet connectivity to process card payments — it cannot authorize cards offline. When connectivity drops, the terminal enters a waiting state. Your POS app should detect the offline state, optionally fall back to cash, and retry any in-progress terminal requests when connectivity returns. Do not queue card transactions offline — they will not be processed until reconnected.
What Works (and Does Not Work) Offline
| Feature | Online | Offline |
|---|---|---|
| Card payment (tap/chip/PIN) | Yes | No |
| Display invoice/amount | Yes | Limited (last pushed) |
| Receipt printing | Yes | No (for new sales) |
| Terminal status check | Yes | No |
| Cash recording (app-side) | Yes | Yes (your app, not terminal) |
The Paystack Terminal is a cloud-connected device. Every card authorization goes through the payment network in real time. There is no offline authorization mode.
Detecting Terminal Offline State
// Poll terminal status before pushing a payment
async function checkTerminalStatus(terminalId) {
var response = await fetch(
'https://api.paystack.co/terminal/' + terminalId,
{ headers: { Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY } }
);
var data = await response.json();
// data.data.status: 'active' | 'inactive'
return data.data?.status === 'active';
}
// In your POS checkout flow
async function processPayment(terminalId, amount) {
var online = await checkTerminalStatus(terminalId);
if (!online) {
// Offer fallback
return { error: 'Terminal offline', fallback: 'cash' };
}
// Push to terminal
return pushToTerminal(terminalId, amount);
}
// Your POS app should also watch for network connectivity
window.addEventListener('offline', () => {
showAlert('Network disconnected. Payment terminal unavailable. Accept cash or wait for reconnection.');
});
window.addEventListener('online', () => {
hideAlert();
recheckTerminalStatus();
});
Designing POS for Intermittent Connectivity
Practical patterns for connectivity-resilient POS systems:
- Dual connectivity: Connect the terminal to both Wi-Fi and a 4G SIM. Most Paystack Terminal devices support SIM cards. When Wi-Fi drops, the SIM activates automatically.
- Cash fallback UI: Add a "Record cash payment" button that logs the sale locally without needing terminal connectivity. Sync to your backend when online.
- Status indicator: Show a green/red dot in your POS UI reflecting terminal status. Poll GET /terminal/:id every 30 seconds during active sessions.
- In-flight timeout handling: When you push a payment and the terminal goes offline mid-transaction, poll GET /terminal/:id/event for the action_id to check completion. Set a 60-second timeout before showing a "retry or use cash" prompt.
// Polling for in-flight terminal action
async function pollTerminalAction(terminalId, actionId, maxAttempts = 12) {
for (var i = 0; i < maxAttempts; i++) {
var response = await fetch(
'https://api.paystack.co/terminal/' + terminalId + '/event/' + actionId,
{ headers: { Authorization: 'Bearer ' + process.env.PAYSTACK_SECRET_KEY } }
);
var data = await response.json();
if (data.data?.status === 'success') return { paid: true };
if (data.data?.status === 'failed' || data.data?.status === 'timeout') return { paid: false };
await new Promise(r => setTimeout(r, 5000)); // wait 5s between polls
}
return { paid: false, error: 'timeout' };
}
Learn More
This guide is part of the Paystack Terminal guide series.
Key Takeaways
- ✓Paystack Terminal is online-first. Card authorization requires a live connection to the payment network.
- ✓The terminal cannot process cards offline — unlike some POS devices with offline PIN, Paystack does not support this.
- ✓Design your POS app to detect terminal connectivity status and offer a cash fallback when offline.
- ✓Transactions in-progress when connectivity drops will timeout — the customer must retry on reconnect.
- ✓Use the GET /terminal/:id endpoint to poll terminal status and detect if a device is online.
- ✓For high-connectivity-risk environments, deploy with a 4G/LTE SIM as a failover alongside Wi-Fi.
Frequently Asked Questions
- Can Paystack Terminal process contactless payments without internet?
- No. Contactless (tap-to-pay), chip-and-PIN, and magnetic stripe all require an active internet connection for authorization. The payment network verification happens in real time. There is no offline batch mode.
- What happens to a transaction that was in-progress when connectivity was lost?
- The terminal will display a "processing" screen until it times out. On timeout, the transaction is cancelled and no money moves. The customer must retry. Check your transaction history — no charge will appear for a timed-out transaction.
- Does the Paystack Terminal have a built-in SIM?
- Some Paystack Terminal models support SIM cards for mobile data connectivity. Check the spec sheet for your specific device model. Using a SIM as a connectivity fallback significantly reduces outage risk in areas with unreliable Wi-Fi.
- How should I handle the cash fallback in my inventory system?
- Record cash sales in your POS app with a different payment_method: "cash" flag. Store them locally if offline, sync when back online. Inventory should decrement the same way as card sales. Your daily reconciliation should balance card terminal receipts against Paystack dashboard totals, and cash sales against your cashbox count.
Ready to build real-world apps?
Join the McTaba Labs full-stack marathon (4 months full-time · 6 months part-time). Learn M-Pesa, USSD, and WhatsApp engineering while shipping 8 production apps.
Apply to the McTaba Marathon