Skip to main content
The Kibble CLI has two non-interactive modes designed for scripting, CI pipelines, and agent-driven workflows. The --yes flag creates a payment link entirely from environment variables and writes JSON to stdout. The --stdin flag accepts a JSON invoice payload via stdin and returns a JSON response — no prompts, no browser, no human in the loop. Pass --yes to create a payment link without any prompts. All configuration comes from environment variables. The CLI writes a single JSON object to stdout and exits.
KIBBLE_EMAIL=you@example.com \
KIBBLE_AMOUNT=99.00 \
npx create-kibble --yes

Required environment variables

env.KIBBLE_EMAIL
string
required
Your merchant email address. Used for payment confirmation notifications.
env.KIBBLE_AMOUNT
string
required
The charge amount in USDC. Must be a positive number with at most two decimal places (e.g. 49.00, 1000).

Optional environment variables

env.KIBBLE_WALLET_TYPE
string
default:"byo"
Wallet type. Accepts privy (Kibble-provisioned) or byo (bring your own). Defaults to byo.
env.KIBBLE_WALLET
string
Your Base-compatible EVM wallet address. Required when KIBBLE_WALLET_TYPE is byo or unset.
env.KIBBLE_BUSINESS_NAME
string
default:"My Business"
Business name that appears on the payment page. Defaults to "My Business".

JSON output

The --yes flag prints a single JSON object to stdout. Use jq or any JSON parser to extract individual fields.
{
  "slug": "my-business-a1b2c3",
  "paymentLink": "https://pay.kibble.sh/pay/my-business-a1b2c3",
  "merchantPortal": "https://pay.kibble.sh/merchant/my-business-a1b2c3",
  "walletAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
  "iframeSnippet": "<iframe src=\"https://pay.kibble.sh/pay/my-business-a1b2c3\" width=\"480\" height=\"640\" frameborder=\"0\"></iframe>"
}

Shell examples

KIBBLE_EMAIL=billing@company.example \
KIBBLE_AMOUNT=500.00 \
KIBBLE_WALLET_TYPE=privy \
KIBBLE_BUSINESS_NAME="Acme SaaS" \
npx create-kibble --yes

--stdin flag: programmatic invoice creation

Pipe a JSON invoice payload to stdin to create an invoice without any prompts. The CLI validates the payload, calls the Kibble API, and writes the response JSON to stdout.
echo '{ ... }' | npx create-kibble --stdin

Payload schema

The payload must be valid JSON conforming to the CreateInvoiceSchema. All fields below correspond directly to what you’d enter in the interactive flow.
merchant_email
string
required
Your merchant email address.
merchant_name
string
required
Your business name. Appears in the invoice header.
merchant_address
string
required
Your business address. Appears in the invoice “From” section.
vendor_name
string
required
Name of the person or company you’re billing.
vendor_email
string
required
Email address where the PDF invoice is sent immediately on creation.
vendor_address
string
Optional. Vendor address that appears on the invoice.
line_items
object[]
required
Array of line items. Minimum 1, maximum 30.
due_date
string
required
Payment due date in YYYY-MM-DD format (e.g. "2026-06-30").
issue_date
string
Optional. Invoice issue date in YYYY-MM-DD format. Defaults to today if omitted.
notes
string
Optional. Free-text notes that appear at the bottom of the invoice.
wallet_type
string
required
privy for a Kibble-provisioned wallet, or byo if you supply your own address.
wallet_address
string
Your Base EVM wallet address. Required when wallet_type is byo.
webhook_url
string
Optional. URL that receives a POST request when payment is confirmed on-chain.
send_now
boolean
When true, the invoice email is sent to the vendor immediately. Defaults to true.

Complete example

cat invoice.json | npx create-kibble --stdin

JSON response

{
  "invoice_id": "inv_01j9abc123",
  "invoice_number": "INV-0042",
  "slug": "acme-saas-inv-0042",
  "invoice_url": "https://pay.kibble.sh/invoice/acme-saas-inv-0042",
  "pdf_url": "https://pay.kibble.sh/invoice/acme-saas-inv-0042/pdf",
  "deposit_address": "0x4a3e...c92f",
  "total_amount": "2200.00",
  "sent_at": "2026-06-01T12:34:56.000Z"
}

--stdin --dry-run: validate without sending

Add --dry-run alongside --stdin to validate your JSON payload without hitting the API. The CLI parses and validates the payload, then echoes the normalized JSON back to stdout without creating an invoice or sending any emails.
cat invoice.json | npx create-kibble --stdin --dry-run
This is useful for:
  • Testing pipeline JSON generation before deploying to production
  • Catching schema errors in CI before they reach the API
  • Verifying that field values (amounts, dates, emails) pass validation
If the payload is valid, the CLI prints the parsed JSON and exits with code 0. If the payload is invalid, it prints an error JSON object to stderr and exits with code 1.
$ echo '{"merchant_email":"you@example.com","merchant_name":"Acme","merchant_address":"123 Main","vendor_name":"Vendor","vendor_email":"v@vendor.com","line_items":[{"description":"Work","quantity":1,"unit_price":"100.00"}],"due_date":"2026-07-01","wallet_type":"privy"}' \
  | npx create-kibble --stdin --dry-run

{"merchant_email":"you@example.com","merchant_name":"Acme",...}

KIBBLE_BASE_URL: non-production environments

Point the CLI at a different API endpoint by setting KIBBLE_BASE_URL. This works with all three modes: interactive, --yes, and --stdin.
KIBBLE_BASE_URL=http://localhost:3000 npx create-kibble
KIBBLE_BASE_URL=https://staging.pay.kibble.sh \
KIBBLE_EMAIL=test@example.com \
KIBBLE_AMOUNT=1.00 \
npx create-kibble --yes
Use KIBBLE_BASE_URL during local development or staging to avoid creating real payment links and sending live emails.

DO_NOT_TRACK=1: disable analytics

The CLI collects anonymous usage data to help improve the product. No personally identifiable information is sent. To opt out entirely:
DO_NOT_TRACK=1 npx create-kibble
This works in all modes. EU users are also asked for consent at the start of each interactive session regardless of this setting.

Environment variable reference

VariableRequiredDefaultDescription
KIBBLE_EMAIL--yes onlyMerchant email address
KIBBLE_AMOUNT--yes onlyCharge amount in USDC
KIBBLE_WALLET_TYPENobyoprivy or byo
KIBBLE_WALLETIf byoBase EVM wallet address
KIBBLE_BUSINESS_NAMENoMy BusinessBusiness name on payment page
KIBBLE_BASE_URLNohttps://pay.kibble.shOverride the API base URL
DO_NOT_TRACKNounsetSet to 1 to disable analytics