cimplify

Test Mode

Two approaches: Demo mode (fully simulated, no API key) and Test mode (pk_test_ key, real backend, no real charges).

TSX
// Demo mode -- no API key, fully simulated
<CimplifyProvider>
  {/* isDemoMode === true, no network calls */}
  <CimplifyCheckout demoMode={true} onComplete={(r) => console.log(r)} />
</CimplifyProvider>

// Test mode -- real backend, sandbox payments
<CimplifyProvider client={createCimplifyClient({ publicKey: "pk_test_..." })}>
  <CimplifyCheckout onComplete={(r) => console.log(r)} />
</CimplifyProvider>

Demo Mode vs Test Mode

FeatureDemo ModeTest Mode
Public keyEmpty / not setpk_test_...
API callsNoneReal (sandbox environment)
Business dataNullReal business info
Products / cartSimulatedReal data
CheckoutSimulated with artificial delaysReal flow, sandbox payment processor
OrdersFake order objectReal orders in test environment
ChargesNoneNone (sandbox)
Use caseDevelopment, prototyping, UI iterationIntegration testing, staging, QA

Setting Up Test Mode

Get a test key from Desk > Settings > Developer.

curl
# .env.local
NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY=pk_test_your_public_key

Test Cards

Card NumberResult
4242 4242 4242 4242Successful payment
4000 0000 0000 0002Card declined
4000 0000 0000 9995Insufficient funds

Use any future expiry date, any 3-digit CVV, and any cardholder name.

Test Mobile Money

Phone NumberResult
0551234567Successful payment
0550000000Payment failure

Demo Mode Details

TSX
import { useCimplify } from "@cimplify/sdk/react";

function App() {
  const { isDemoMode, business, isReady } = useCimplify();

  // isDemoMode === true when no publicKey
  // business === null (no API calls)
  // isReady === true (bootstrap skipped)

  return isDemoMode ? <DemoBanner /> : <Shop />;
}

Use demo mode for local development and UI prototyping when you do not need real data. Use test mode for integration testing and staging where you need real API responses, a real cart, and a real checkout flow without actual charges.

Visual Indicators

IndicatorWhere
TEST MODE badgePayment iframe, automatically shown with pk_test_ keys.
Test-mode noticeDrop-in checkout UI.
Test context labelOrders in dashboard, separate from production.

Next Steps