lomi.

Command reference

Complete reference for every lomi. CLI command, subcommand, and global flag.

All commands support global flags documented in Getting started.

Authentication

lomi login

Authenticate via browser device flow. Stores a CLI token globally.

lomi login
lomi login --no-browser
lomi login --profile sandbox

lomi logout

Remove stored credentials for a profile.

lomi logout
lomi logout --profile sandbox

lomi whoami

Show the active profile and account context.

lomi whoami

lomi status

Verify login and API connectivity (GET /me + GET /accounts/balance).

lomi status

lomi list-profiles

List all saved auth profiles.

lomi list-profiles

lomi switch <profile>

Set the default active profile.

lomi switch sandbox

Project setup

lomi init

Scaffold SDK client, examples, and .env. See Initialize a project.

lomi init
lomi init --yes -e sandbox -L ts --api-key lomi_sk_test_xxx

lomi update

Update @lomi./sdk in the current project (runs your package manager).

lomi update

lomi ui

Install and update lomi. UI checkout components from the live docs registry. See lomi. UI commands.

lomi ui list
lomi ui add payment-provider-selector
lomi ui add --all
lomi ui update
lomi ui update --component payment-provider-selector

No authentication required. Requires Node.js, npx, and a shadcn project (components.json).

SubcommandDescription
listFetch and print available registry components
add <name>Install one component via npx shadcn@latest add
add --allInstall every registry item
updateRe-install locked components from .lomi/ui-lock.json
FlagApplies toDescription
--pathadd, updateTarget project directory
--yesadd, updateSkip shadcn init prompt
--dry-runadd, updatePrint commands without running
--componentupdateUpdate a single locked component

lomi init --with-ui <name> installs a component after scaffold. See Initialize a project.


Development

lomi quickstart

Golden-path connectivity check and recommended next steps. See Quickstart command.

lomi quickstart
lomi quickstart --json
lomi quickstart --skip-probe

lomi listen

Cloud webhook relay (sandbox-first). See Listen for webhooks.

lomi listen
lomi listen http://localhost:3000/webhooks
lomi listen --allow-production

lomi probe

Run read-only integration health checks.

lomi probe
lomi probe --send-test-webhook

lomi dev

Start a local webhook development server. See Local development server.

lomi dev
lomi dev --port 4242
lomi dev --verify-signature
lomi dev --env-file .env.local
FlagDefaultDescription
-p, --port4242HTTP port
--env-file.envPath to dotenv file
--verify-signatureautoVerify X-Lomi-Signature header
--skip-rules-install-Skip agent rules prompt

Endpoints:

  • POST /webhook, receive webhook events
  • GET /health, health check

Webhooks

lomi webhooks list

List configured webhook endpoints.

lomi webhooks list

lomi webhooks test <id>

Send a test event to a webhook endpoint.

lomi webhooks test wh_xxxxxxxx

Catalog and transactions

lomi products list

List products and prices in your organization.

lomi products list

lomi transactions list

List recent transactions.

lomi transactions list
lomi transactions list --limit 25 --json
FlagDefaultDescription
--limit10Maximum transactions to return

lomi transactions get <id>

Get a transaction by ID (GET /transactions/{id}).

lomi transactions get 123e4567-e89b-12d3-a456-426614174000
lomi transactions get 123e4567-e89b-12d3-a456-426614174000 --json

lomi refunds create

Create a refund for a completed transaction (POST /refunds).

lomi refunds create
lomi refunds create \
  --transaction-id 123e4567-e89b-12d3-a456-426614174000 \
  --amount 5000 \
  --reason duplicate_charge \
  --refund-type partial \
  --json
FlagDescription
--transaction-idTransaction UUID to refund
--amountRefund amount (same currency as transaction)
--reasonOptional reason
--refund-typefull or partial

lomi refunds list

List refunds.

lomi refunds list
lomi refunds list --status completed --limit 20 --json

lomi refunds get <id>

Get a refund by ID.

lomi refunds get ref_xxxxxxxx --json

Payments

These commands require authentication and use your CLI token (no manual merchant ID).

lomi checkout create

Create a hosted checkout session via POST /checkout-sessions.

lomi checkout create
lomi checkout create \
  --amount 10000 \
  --currency XOF \
  --success-url https://example.com/success \
  --cancel-url https://example.com/cancel \
  --json

Interactive mode prompts for: price ID or amount, currency, success/cancel URLs, optional customer email.

Headless mode requires --currency, --success-url, --cancel-url, and either --amount or --price-id.

After creation, prints the checkout URL and a ready-to-paste HTML embed snippet using @lomi./embed:

<!-- npm install @lomi./embed -->
<script type="module">
  import { loadLomiCheckout } from '@lomi./embed';
  document.getElementById('pay').addEventListener('click', () => {
    loadLomiCheckout({
      checkoutUrl: 'https://checkout.lomi.africa/checkout/cs_...',
      mode: 'modal',
      onComplete: (p) => console.log(p),
    });
  });
</script>
<button id="pay">Pay</button>

See Embed checkout widget for inline mode and self-hosted dist/lomi.js.

lomi payments create

Create a payment link via the payment links API.

lomi payments create
lomi payments create --title "Invoice #42" --amount 5000 --currency XOF --json

Interactive mode prompts for: title, amount, currency. Headless mode requires all three flags.


AI agent rules

lomi install-rules

Install lomi. documentation for AI coding tools. See Install agent rules.

lomi install-rules
lomi install-rules --target cursor --target llms.txt
lomi install-rules --force
TargetOutput
cursor.cursor/rules/lomi.*.mdc
claude-codeCLAUDE.md
codexAGENTS.md
vscode.github/instructions/lomi-*.instructions.md
llms.txtProject-root llms.txt

Typical workflows

New integration from scratch

npm install -g lomi.cli
lomi login
lomi quickstart
mkdir my-store && cd my-store
lomi init
lomi listen http://localhost:3000/webhooks

Sandbox vs production profiles

lomi login --profile sandbox
lomi login --profile production
lomi switch sandbox
lomi init --profile sandbox

CI pipeline

export LOMI_ACCESS_TOKEN=$CLI_TOKEN
lomi status
lomi init --yes -e sandbox -L ts --api-key $LOMI_SECRET_KEY --skip-package-install --skip-rules-install

Help

lomi --help
lomi login --help
lomi init --help
lomi dev --help
lomi install-rules --help

Maintainers

The lomi docs command is hidden from default --help. It is for lomi. contributors working on documentation in the monorepo, not for merchant integrators.

lomi docs check

Run docs lint and OpenAPI drift checks from the monorepo root:

lomi docs check

Equivalent to cd apps/docs && pnpm lint && pnpm docs:drift. See Writing for lomi. docs.

On this page