Offline / Deferred Mode
When network connectivity is unavailable, Core can queue transactions locally and send them when connectivity is restored.
Request offline queue status
Api.requestOfflineTransactionsStatus(context);
Response: ACTION_OFFLINE_STATUS
case Messages.ACTION_OFFLINE_STATUS: {
String json = intent.getStringExtra(Messages.OFFLINE_STATUS);
OfflineStatus status = WrapperUtils.getOfflineStatusFromJson(json);
// status.getTransactions() — number of queued transactions
// status.getTotalAmount() — total amount in minor units
// status.getOldestTransaction() — Date of oldest queued transaction
// status.isManualDeferredActive() — whether manual deferred mode is on
break;
}
Manual deferred mode
If the terminal is configured with manualDeferred = true, your app can explicitly activate or deactivate offline mode:
Api.triggerManualOfflineMode(context, true); // activate Api.triggerManualOfflineMode(context, false); // deactivate
Note
Manual deferred mode requires the terminal to have manualDeferred = true and deferred limits configured. Contact Rapyd to enable this feature.