CLI

Run your whole Paysio account from a terminal, or let an AI agent do it.

The Paysio CLI does everything the dashboard does — products, payment links, invoices, customers, subscriptions, transactions and refunds, disputes, balances and payouts, webhooks, team members, settings, and the production applications — from a terminal. It is built to be driven either by a human or by an AI agent, so every command is fully non-interactive when you ask it to be.

Install

Shell
npm install -g paysio

paysio login          # opens your browser to authorize this terminal
paysio use my-store   # choose the workspace to work in
paysio balance

Requires Node 18 or newer. Standalone binaries for macOS and Windows are available if you would rather not install through npm.

Authentication

paysio login opens your browser, shows a short code, and asks you to approve that terminal. The session belongs to your user and inherits your workspace role, so the CLI can never do more than you can in the dashboard. Sessions are listed and revocable under Settings → API keys.

  • paysio login --email signs in with an emailed code instead, for machines with no browser.
  • PAYSIO_API_KEY=sk_live_... uses a secret API key instead of a session. That key authenticates the public V1 API only, so commands outside it fail with a clear message rather than a confusing 401.
  • paysio logout revokes the session on the server as well as locally.

Test and live mode

Every workspace has a test and a live mode, exactly like the dashboard toggle. A fresh login starts in test. Check with paysio mode, switch with paysio mode live, or override a single command with --live / --test.

Confirmations

There are two tiers, and they behave differently on purpose.

Live money and account destruction. transactions refund, transactions void, transactions cancel, payouts send, money add, money withdraw, payout-links create, payout-requests approve, disputes accept, disputes refund, disputes submit, campaigns send, apply high-risk and workspaces delete. In live mode you retype the amount (or the workspace slug) interactively, or pass --confirm when there is no terminal. --yes does not work here and that is deliberate. In test mode these fall back to a plain yes/no question.

Everything else destructive. Deletes, removals and one-way replacements — api-keys revoke, webhooks delete, webhooks rotate-secret, payment-links delete, payout-links delete, payout-requests reject, invoices send, invoices void, subscriptions cancel, members remove, domain remove, campaigns cancel, campaigns delete, email-templates delete, subscribers remove, products variants, store restore, store templates apply and fulfillments cancel — ask a yes/no question that --yes skips.

--json skips the second tier entirely

In --json mode the light confirmations do not prompt at all, because a prompt would hang a script. The live-money tier is not affected: it still demands --confirm and still exits 4 without it. So an agent running with --json can delete a webhook endpoint unattended, but cannot move a cent of real money without a human having passed --confirm.

Global flags

These work on every command, before or after the subcommand.

FlagWhat it does
--workspace <slug>Act on this workspace instead of the default, for one command.
--live / --testOverride the current mode for one command.
--jsonMachine-readable JSON on stdout, no colour, never prompts.
--yesSkip benign confirmations. Deliberately does not cover money or deletion.
--confirmGive the required confirmation for an irreversible command non-interactively.
--quietSuppress status output; results still print.
-v, --versionPrint the CLI version.
-h, --helpHelp for any command or group, e.g. paysio disputes --help.

Using it from a script or an agent

Pass --json to any command. It prints machine-readable JSON on stdout, turns off colour, and never prompts — a command missing required input fails with a structured error instead of hanging. Human status lines go to stderr, so paysio ... --json > out.json is always clean JSON.

Shell
paysio transactions list --status failed --limit 20 --json
paysio products create --name "Coaching call" --price 149 --json
paysio transactions refund txn_123 --amount 25.00 --confirm --json

Exit codes let a script branch without parsing text:

CodeMeaning
0Success
1API or validation error
2Usage error (bad flags or arguments)
3Authentication or permission error — run paysio login
4Confirmation required but not given

Dollars in, cents out

Amount flags are written in dollars (--amount 25.50) because that is what people type. Amounts inside JSON payloads and command output are always integer cents, matching the API.

The webhook development loop

paysio listen streams your workspace’s events to the terminal and, optionally, forwards each one to a local URL with a real Paysio-Signature header, so the handler you are writing verifies signatures exactly as it will in production. It works even when you have no webhook endpoints configured.

Shell
# terminal 1 - prints a signing secret, then forwards events
paysio listen --forward-to localhost:3000/webhooks

# terminal 2 - creates a REAL sandbox charge so the event actually fires
paysio trigger payment.completed

paysio trigger does not fabricate payloads. Each fixture drives the real API to create genuine sandbox objects, so every downstream effect — webhooks, ledger entries, emails — happens the way it will in production. Run paysio trigger --list to see the built-in fixtures, or pass your own with --fixture ./flow.json. It refuses to run in live mode.

AI agents

The CLI ships with a Model Context Protocol server and a Claude Code skill, so an agent can operate a Paysioaccount with the same guardrails a human gets.

Shell
paysio mcp add claude-code    # or: claude, cursor
paysio skills add             # installs the Paysio skill for Claude Code
paysio agent-context --json   # one-call briefing: workspace, mode, balance, activity
paysio --llms                 # machine-readable manifest of every command

The MCP server exposes a curated tool set rather than raw shell access: paysio_context, paysio_list, paysio_get, paysio_create, paysio_action, paysio_describe, paysio_apply_debit_payouts and paysio_api. Tools that move money refuse to execute in live mode unless the caller passes confirm: true, which the skill instructs the agent to obtain from you first.

Applying for production

The Paysio Debit & Payouts application can be completed entirely from the terminal, which is the flow most worth handing to an agent.

Shell
paysio apply debit-payouts                 # 6-step guided wizard
paysio apply debit-payouts --template      # or a JSON skeleton for scripts
paysio apply debit-payouts --file app.json --dry-run   # field-level validation
paysio apply debit-payouts --file app.json             # submit
paysio apply status

--dry-run returns { valid, errors: [{ field, message }] } so an agent can fix the file and retry without touching the server. The high-risk (NMI) application works the same way through paysio apply high-risk, with --documents to upload supporting files and --signature for the signer’s signature image.

Handle application files carefully

A completed application file contains an SSN and bank account numbers. The CLI prompts for those with masked input when you use the wizard, and reminds you to delete the file after a --file submission. Never commit one.

Raw API access

When no command fits, call the API directly with your existing session. This is the escape hatch that keeps an agent from ever being blocked.

Shell
paysio api GET /api/products --query workspace_id=ws_123 --json
paysio api POST /api/v1/charges --data @charge.json --json

Command reference

Every command below is real and current. Add --help to any group to see its flags (paysio invoices --help), or run paysio --llms for the same tree as JSON, which is what you should hand an agent rather than pasting this page.

Two conventions worth knowing before you read the list

Commands that take a whole object accept --file thing.json as well as flags, and the flags win over the file. Commands marked irreversible below move money or destroy an account, and are gated the hard way described under confirmations.

Session and navigation

CommandWhat it does
paysio loginAuthorize this terminal through the browser. --email uses an emailed code instead.
paysio logoutRevoke the session on the server as well as locally.
paysio whoamiShow the signed-in user, active workspace and mode.
paysio use [slug]Set the default workspace. Interactive picker when no slug is given.
paysio mode [mode]Show or switch test/live for the active workspace.
paysio search <query>Search customers, transactions, payouts, subscriptions, products, links and discounts at once.
paysio open [page]Open a dashboard page in the browser (dashboard, balances, transactions, disputes, customers, products…).
paysio docs [topic]Open these docs, optionally at a topic such as charges or webhooks.
paysio statusCheck the Paysio API status.
paysio upgradeUpdate the CLI to the latest version.
paysio completion <shell>Print completion setup for bash, zsh, fish or pwsh.

Products and catalog

CommandWhat it does
products listList products. --archived, --all, --limit.
products get <id>Show a product with its variants.
products createCreate a product. Flags for common fields (--name, --price, --pricing-type, --billing-period, --stock, --tax) or --file for the full shape.
products update <id>Update a product. Only the fields you pass change.
products archive <id>Archive a product. --restore to bring it back.
products variants <id>Replace a product’s variants from a JSON file.
discounts listList discount codes. --all includes archived.
discounts get <code>Show a discount code.
discounts createCreate a code. --type, --value, --duration, --usage-limit, --products.
discounts update <code>Change value or usage limit.
discounts archive <code>Archive a code. --restore to unarchive.

Storefront

CommandWhat it does
store getShow the storefront and its current version.
store publishPublish the current version live.
store versionsList storefront versions.
store restore <version>Point the storefront back at an earlier version.
store subdomain checkCheck whether a subdomain is available.
store subdomain setSet the storefront subdomain and republish.
store templates listBrowse the template catalog. --category, --search, --sort.
store templates applyApply a template. Saves your current design first unless --no-save-current.
home-blocks catalogList metric blocks available for the dashboard home page.
home-blocks get / setRead or replace the home layout from a JSON file.
brandingUpdate avatar, checkout colours and display name.
pixels get / setRead or set Meta, Google and TikTok pixels. Pass none to clear one.

Selling

CommandWhat it does
payment-links list / getList or inspect payment links.
payment-links createCreate a link. --product, --upsell, --collect-shipping, --payment-methods, --slug.
payment-links update <id>Update a link. Items in --file fully replace the existing items.
payment-links enable / disableActivate or deactivate a link without deleting it.
payment-links delete <id>Delete a link. Asks to confirm; --yes skips.
payment-links check-slugCheck whether a slug is free before creating.
checkout get / setRead or update checkout settings: --three-ds, --descriptor, --surcharge, or a JSON file.
invoices list / getList or inspect invoices with line items.
invoices createCreate a draft. --customer-email, repeated --item, --discount-code, --due-date, --memo.
invoices send <id>Email the invoice with a pay link and PDF attached.
invoices void <id>Void an unpaid invoice.
invoices pdf <id>Download the invoice PDF to a file.
subscriptions list / getList subscriptions, or show one with its full event history.
subscriptions cancel <id>Cancel at period end, or --immediate. Asks to confirm; --yes skips.
subscriptions pause / resumePause an active subscription, or resume a paused or cancel-scheduled one.
subscriptions reactivate <id>Reactivate a cancelled subscription.
subscriptions free-days <id>Grant free days, pushing the next billing date out.

Customers

CommandWhat it does
customers listList customers. --search does a typeahead lookup.
customers get <id>Show a customer with transactions, subscriptions and lifetime stats.
customers vault list <id>List saved payment methods. --payout-eligibility adds per-method payout eligibility.
subscribers list / add / removeManage the email marketing list.
notes set / list / clearInternal notes on a transaction, customer or payout.

Transactions and orders

CommandWhat it does
transactions listFilter by --status, --direction, --method, --customer, --processor, --disputed; sort and paginate.
transactions get <id>Show a transaction in full, including 3DS and processor detail.
transactions refund <id>Full refund, or partial with --amount. Irreversible.
transactions void <id>Void an unsettled transaction. Irreversible.
transactions cancel <id>Cancel an order, refunding by default. --no-refund, --no-notify. Irreversible.
transactions refresh <id>Re-poll the processor for the latest status.
fulfillments list <txn>Show fulfillments and what is still shippable on an order.
fulfillments create <txn>Mark an order or part of it shipped. --tracking, --carrier, --items, --no-notify.
fulfillments cancel <id>Cancel a fulfillment.
fulfillments carriersList supported shipping carriers.
export transactionsExport to CSV with the same filters as transactions list.

Disputes and chargebacks

CommandWhat it does
disputes listList disputes. --status, --kind.
disputes get <id>Show a dispute with events, files and match candidates.
disputes statsOpen count, at-risk amount, win rate and dispute rate.
disputes match <id>Match an unmatched dispute to a transaction.
disputes draft <id>Generate an AI rebuttal draft and save it as the narrative.
disputes evidence get / setRead the evidence bundle, or set narrative, notes, product type and excluded sections.
disputes evidence uploadAttach a PDF or image, up to 25 MB. --kind, --label.
disputes evidence remove-fileRemove an attached evidence file.
disputes preview <id>Render the response PDF locally before submitting.
disputes submit <id>Submit the response. Needs a saved narrative. Irreversible.
disputes accept <id>Concede the chargeback. Irreversible.
disputes refund <id>Refund an Ethoca/CDRN alert to deflect the chargeback. Irreversible.

Balance and money out

CommandWhat it does
balancePaysio Debit balance plus recent ledger entries. --entries to show more.
money addPull money from a linked account into your balance. Irreversible.
money withdrawWithdraw balance to a linked account. Irreversible.
payouts list / getList money-out with --purpose, or show one with destination and fees.
payouts sendSend to a recipient by identity and instrument. --rail picks the network. Irreversible.
recipients createCreate a bank recipient, returning the identity and instrument ids payouts send needs.
payout-links createSend money by claim link. Directed links hold the balance until claimed. Irreversible.
payout-links list / getList links, or show one with its fee breakdown.
payout-links update / resendEdit a pending link, or resend the claim email.
payout-links cancel <id>Cancel a pending link and release the held balance.
payout-links delete / check-slugDelete a link, or check slug availability.
payout-requests list / getReview inbound requests with fees and submitted fields.
payout-requests approve <id>Approve and send the money. --amount to pay less than requested. Irreversible.
payout-requests reject <id>Reject a request.
payout-methods list / add / removeManage linked bank accounts. Cards must be added in the dashboard.
payout-schedule get / setAutomatic payout cadence: --mode, --interval, anchors, --destination, --retain-percent.

Email marketing

CommandWhat it does
campaigns list / get / createManage campaigns. Create takes an audience filter and a template.
campaigns update / deleteEdit a draft or scheduled campaign, or delete it.
campaigns send <id>Send now. This emails real subscribers. Irreversible — needs --confirm.
campaigns schedule <id>Schedule for a future time with --at.
campaigns pause / resume / cancelControl a sending or scheduled campaign.
campaigns stats / recipientsDelivery and engagement counters, or the recipient list.
campaigns recipient-countHow many subscribers match an audience filter, before you send.
email-templates list / get / createManage templates. Designs are edited in the dashboard builder.
email-templates rename / duplicate / deleteHousekeeping on templates.
email-templates versionsList saved versions of a template.
email-templates test-sendSend yourself a test of a template.

Developer tools

CommandWhat it does
api <method> <path>Raw authenticated request. --data, --query, --header, --include-status.
api-keys list / create / revokeManage API keys. The full key is shown once, at creation.
webhooks list / create / updateManage endpoints and their subscribed events. The signing secret is shown once.
webhooks deliveries <id>Recent delivery attempts. --failed narrows to failures.
webhooks rotate-secret <id>Rotate the signing secret. New secret shown once.
webhooks delete <id>Delete an endpoint.
listenStream events live and optionally forward them to a local URL with a real signature.
trigger <event>Create real sandbox objects so events actually fire. --list, --fixture. Test mode only.
mcp add / serveRegister the MCP server with an AI client, or run it over stdio.
skills addInstall the Paysio skill for Claude Code.
agent-contextOne-call briefing: workspace, mode, capabilities, balance and recent activity.

Apps

CommandWhat it does
apps init <handle>Create the app and scaffold it in the current directory: paysio.app.json plus the React starter — the dashboard’s own components (popup, menus, list view, forms) and a welcome page that shows every pattern. --template static for a single HTML page instead. The client secret is printed once.
apps scaffoldWrite the React starter into an existing app folder, reading the name from paysio.app.json. Existing files are kept unless --force.
apps devRun the app locally (bun run dev, or a static server for public/) behind an https tunnel and point your dashboard at it — registered to your user only, so no merchant ever sees your laptop. --port.
apps deploySet the app’s production URL. --url.
apps checkRun the submission checklist without submitting — the same one review runs.
apps submitSubmit the current configuration for review. --changelog is required and becomes the “What’s new” entry.
apps listApps you own, with their status.
apps versionsVersion history: what was submitted, approved and released.
apps installsHow many workspaces have this app installed.
apps rotate-secretIssue a new client secret. The old one stops working immediately, so redeploy first.

Workspace, team and settings

CommandWhat it does
workspaces list / currentList workspaces you belong to, or show the active one.
workspaces createCreate a workspace. --name, --timezone.
workspaces delete <slug>Permanently delete a workspace, owner only. Irreversible.
members list / inviteList members and pending invites, or invite a teammate with a role.
members set-role / remove / revoke-inviteTeam administration. Owner only.
members roles list / create / rename / deleteCustom roles beyond owner/developer/member. Choose which pages a role can see, then hand it out with members set-role. Owner only.
members roles set-limit / members set-limitDaily payout cap in cents, on a role or on one person. Enforced when money is sent, not just hidden in the UI. --amount none clears it.
domain get / set / refresh / removeCustom domain. set prints the CNAME to create; refresh re-checks DNS and SSL.
apple-pay domains list / add / removeRegister domains for Apple Pay.
blocklist list / add / removeFraud block rules by email, phone, country, postal code or card BIN.
blocklist checkTest whether a prospective payment would be blocked, without charging anything.
billing get / payments / portalCurrent plan and fee balance, platform billing payments, and the portal URL.

Configuration

VariablePurpose
PAYSIO_API_BASEPoint the CLI at another environment. Defaults to https://api.paysio.com — the CLI talks to the backend directly rather than through the paysio.com edge proxy.
PAYSIO_WEB_BASEOverride where dashboard and pay links point. Derived from the API base by default.
PAYSIO_API_KEYAuthenticate with an API key instead of a session (public V1 API only).
PAYSIO_NO_UPDATE_CHECKSilence the daily update check.

Drop a paysio.json in a project to pin the workspace and mode for everyone working in it, so nobody runs a command against the wrong account:

JSON
{ "workspace": "my-store", "mode": "test" }

Security

  • The session token is stored in ~/.paysio/credentials.json with owner-only permissions and is never printed.
  • The CLI cannot accept a card number. Keyed payments stay in the dashboard virtual terminal, which keeps your terminal out of PCI scope.
  • Secrets such as SSNs and bank account numbers are collected through masked prompts, never as flags that would land in your shell history.
  • No telemetry. The CLI does not report what you run.