LEGAL NOTICE: All materials, source code, methodologies, and documentation herein are exclusively owned by Richard Dale Keeper Jr as an individual. Protected under U.S. Copyright Law (17 U.S.C.), Defend Trade Secrets Act (18 U.S.C. § 1836), and USPTO provisional patent applications. Any unauthorized reproduction, reverse engineering, or competitive use is subject to immediate injunctive relief and damages up to $50M + full business valuation. This NDA-protected disclosure is for qualified acquisition evaluation only.

RKEEPER POS Developer SDK

Boilerplate integration guide for Clover, Toast & generic POS systems

Patent Pending
REST API
Demo Mode
NDA Required
Quick Start — 3-Step Transaction Flow
1Authorize

Customer swipes EBT card. Items classified as RAW/SNAP-eligible. Network authorization obtained.

action: "authorize"
2Convert State

Kitchen begins prep. RKEEPER converts items RAW → PREPARED via patent-pending State Conversion Method.

action: "convert"
3Complete

Food handed to customer. Transaction settled. ACH batch initiated. USDA audit trail finalized.

action: "complete"

API Endpoint

POST https://YOUR_APP_ENDPOINT/functions/posDemoWebhook

Required Headers

Authorization: Bearer YOUR_API_KEYContent-Type: application/json

Required Body Fields

action, establishment_iditems[], amount (Step 1 only)transaction_id (Steps 2 & 3)
Boilerplate Integration Code

Select your POS platform and download the ready-to-use integration file.

JavaScript
Clover SDK compatible
Works with Clover Flex, Mini, Station
rkeeper-clover-integration.js
/**
 * 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));
API Response Reference

Authorize Response

transaction_idUnique ID — store this for Steps 2 & 3
authorization_codeEBT network auth code (e.g. AUTH123456)
amount_authorizedDollar amount approved by EBT network
compliance.item_state_at_auth"RAW" — confirms SNAP eligibility

Convert Response

conversion.from_state"RAW" — state before preparation
conversion.to_state"PREPARED" — state after kitchen conversion
compliance.state_conversion_method"RKEEPER_SCM_v1" — patent-pending method

Complete Response

settlement.merchant_netDollar amount after 2.5% processing fee
settlement.ach_batch_idACH settlement batch reference number
receiptFull receipt object for customer/record-keeping

© 2026 Richard Dale Keeper Jr · RKEEPER Holdings LLC · All Rights Reserved

Patent Pending · Trade Secret · Authorized Developers Only