RKEEPER POS Developer SDK
Boilerplate integration guide for Clover, Toast & generic POS systems
Customer swipes EBT card. Items classified as RAW/SNAP-eligible. Network authorization obtained.
action: "authorize"Kitchen begins prep. RKEEPER converts items RAW → PREPARED via patent-pending State Conversion Method.
action: "convert"Food handed to customer. Transaction settled. ACH batch initiated. USDA audit trail finalized.
action: "complete"API Endpoint
POST https://YOUR_APP_ENDPOINT/functions/posDemoWebhookRequired Headers
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonRequired Body Fields
action, establishment_iditems[], amount (Step 1 only)transaction_id (Steps 2 & 3)Select your POS platform and download the ready-to-use integration file.
/**
* RKEEPER SDK — Clover POS Integration
* Copyright © 2026 Richard Dale Keeper Jr — All Rights Reserved
* Patent Pending | Confidential | NDA Required
*
* Prerequisites:
* - Clover SDK installed (com.clover.sdk)
* - RKEEPER API Key from your merchant dashboard
* - Internet permission in AndroidManifest.xml
*/
// ─── 1. CONFIGURATION ─────────────────────────────────────────────────────────
const RKEEPER_CONFIG = {
apiKey: 'YOUR_RKEEPER_API_KEY', // From RKEEPER merchant dashboard
establishmentId: 'YOUR_ESTABLISHMENT_ID', // Your restaurant's RKEEPER ID
baseUrl: 'https://YOUR_APP_ENDPOINT/functions/posDemoWebhook',
mode: 'demo', // Change to 'live' after USDA authorization
};
// ─── 2. RKEEPER SDK CLIENT ────────────────────────────────────────────────────
class RKeeperClient {
constructor(config) {
this.config = config;
}
async _post(payload) {
const response = await fetch(this.config.baseUrl, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${this.config.apiKey}`,
'X-Establishment-ID': this.config.establishmentId,
},
body: JSON.stringify(payload),
});
if (!response.ok) throw new Error(`RKEEPER API error: ${response.status}`);
return response.json();
}
/**
* Step 1: Authorize EBT/SNAP payment at point of sale.
* Items are classified as RAW state for SNAP eligibility.
* Call this when the customer swipes/taps their EBT card.
*/
async authorize({ items, ebtCardLast4, amount }) {
return this._post({
action: 'authorize',
establishment_id: this.config.establishmentId,
items,
ebt_card_last4: ebtCardLast4,
amount,
});
}
/**
* Step 2: Convert item state RAW → PREPARED.
* Call this when kitchen begins preparing the food.
* This is the RKEEPER patent-pending State Conversion Method.
*/
async convert({ transactionId }) {
return this._post({
action: 'convert',
transaction_id: transactionId,
establishment_id: this.config.establishmentId,
});
}
/**
* Step 3: Complete transaction and initiate settlement.
* Call this when food is handed to the customer.
*/
async complete({ transactionId }) {
return this._post({
action: 'complete',
transaction_id: transactionId,
establishment_id: this.config.establishmentId,
});
}
}
// ─── 3. CLOVER INTEGRATION ────────────────────────────────────────────────────
const rkeeper = new RKeeperClient(RKEEPER_CONFIG);
/**
* Main function — call from your Clover payment handler.
* Wire this to your Clover IPaymentConnector callback.
*/
async function processRKeeperEBTTransaction(cloverOrder) {
// Map Clover line items to RKEEPER format
const items = cloverOrder.lineItems.map(li => ({
item_id: li.id,
item_name: li.name,
unit_price: li.price / 100, // Clover uses cents
quantity: li.quantity,
}));
const amount = cloverOrder.total / 100;
const ebtCardLast4 = cloverOrder.ebtCard?.last4 || '0000';
console.log('[RKEEPER] Step 1: Authorizing EBT transaction...');
const authResult = await rkeeper.authorize({ items, ebtCardLast4, amount });
if (!authResult.success) {
throw new Error('EBT Authorization failed: ' + authResult.message);
}
console.log('[RKEEPER] Authorization approved:', authResult.authorization_code);
const transactionId = authResult.transaction_id;
// Trigger state conversion when KDS (Kitchen Display) marks order ready
// In production, wire this to your KDS "order ready" event
console.log('[RKEEPER] Step 2: Converting state RAW → PREPARED...');
const convertResult = await rkeeper.convert({ transactionId });
console.log('[RKEEPER] State conversion complete:', convertResult.conversion);
// Complete when item is handed to customer
console.log('[RKEEPER] Step 3: Completing and settling...');
const completeResult = await rkeeper.complete({ transactionId });
console.log('[RKEEPER] Settled. Merchant net: $' + completeResult.settlement.merchant_net);
return completeResult;
}
// ─── 4. EXAMPLE CLOVER ORDER OBJECT ──────────────────────────────────────────
const exampleCloverOrder = {
id: 'CLV_ORDER_12345',
total: 1847, // $18.47 in cents
ebtCard: { last4: '7842' },
lineItems: [
{ id: 'item_001', name: 'Classic Burger', price: 899, quantity: 1 },
{ id: 'item_002', name: 'French Fries', price: 349, quantity: 1 },
{ id: 'item_003', name: 'Fountain Drink', price: 199, quantity: 1 },
{ id: 'item_004', name: 'Side Salad', price: 499, quantity: 1 },
],
};
// Run demo
processRKeeperEBTTransaction(exampleCloverOrder)
.then(result => console.log('[RKEEPER] Transaction complete:', result))
.catch(err => console.error('[RKEEPER] Error:', err.message));
Authorize Response
transaction_idUnique ID — store this for Steps 2 & 3authorization_codeEBT network auth code (e.g. AUTH123456)amount_authorizedDollar amount approved by EBT networkcompliance.item_state_at_auth"RAW" — confirms SNAP eligibilityConvert Response
conversion.from_state"RAW" — state before preparationconversion.to_state"PREPARED" — state after kitchen conversioncompliance.state_conversion_method"RKEEPER_SCM_v1" — patent-pending methodComplete Response
settlement.merchant_netDollar amount after 2.5% processing feesettlement.ach_batch_idACH settlement batch reference numberreceiptFull receipt object for customer/record-keeping© 2026 Richard Dale Keeper Jr · RKEEPER Holdings LLC · All Rights Reserved
Patent Pending · Trade Secret · Authorized Developers Only