Access ~12.4M US business registrations — LLCs, corps, formation dates, registered agents — free from 5 state open-data portals.
Design & media
SmartBill Invoicing
Try itIssue SmartBill invoices through a local CLI with payload validation, dry-run inspection, and PDF retrieval.
What it does
A Python CLI wrapper for the SmartBill.ro API that handles the full invoice lifecycle: collecting input, validating payload structure locally, dry-running to inspect the normalized request, issuing the final invoice after confirmation, and downloading the resulting PDF. Accepts both bare invoice objects and wrapped { "invoice": {...} } payloads. Requires environment configuration for authentication and supports configurable timeout, retries, and debug logging. Respects the SmartBill rate limit of 30 calls per 10 seconds.
When to use it
- Validate invoice payloads locally before any API call
- Dry-run invoice creation to inspect the normalized request
- Issue confirmed invoices and download the resulting PDF
- Integrate SmartBill invoice issuance into automated workflows
The skill document
SmartBill Invoicing
Use scripts/smartbill_cli.py for deterministic SmartBill API calls instead of ad-hoc HTTP snippets.
Workflow
- Collect invoice input from the user.
- Validate payload locally before sending:
python scripts/smartbill_cli.py validate-payload --input references/invoice-example.json --show-payload
- Dry-run to inspect the normalized payload without calling the API:
python scripts/smartbill_cli.py create-invoice --input --dry-run
- Issue final invoice after explicit user confirmation:
python scripts/smartbill_cli.py create-invoice --input --allow-final
- Retrieve PDF once series and number are known:
python scripts/smartbill_cli.py download-invoice-pdf --series-name --number --output- Use the exact
numberstring returned by SmartBill (zero-padded, e.g."0123"). Do not strip leading zeros or convert to an integer. --outputaccepts absolute or relative paths and must end in.pdf.
Required Environment
Set these before calling SmartBill:
MAVERICK_SMARTBILL_USERNAME- SmartBill login emailMAVERICK_SMARTBILL_TOKEN- SmartBill API tokenMAVERICK_SMARTBILL_COMPANY_VAT_CODE- default CIF (optional but recommended)
Optional overrides:
MAVERICK_SMARTBILL_API_BASE(default:https://ws.smartbill.ro/SBORO/api)MAVERICK_SMARTBILL_TIMEOUT_SECONDS(default:30)MAVERICK_SMARTBILL_RETRIES(default:2)MAVERICK_SMARTBILL_DEBUG(default: unset) — set to1,true, oryesto enable request/response debug logging to stderr
Command Guide
validate-payload- Parse and normalize payload shape (bare invoice object or
{ "invoice": {...} }wrapper both accepted). - Validate minimum required structure before API calls.
- Parse and normalize payload shape (bare invoice object or
create-invoice- Create invoice via
POST /invoice. - Requires
--allow-finalto issue a final invoice. - Supports
--dry-run(prints normalized payload, no API call) and--force-draft. - Pass
--debug(or setMAVERICK_SMARTBILL_DEBUG=1) to print full request/response payloads to stderr.
- Create invoice via
get-series- Query available SmartBill series via
GET /series.
- Query available SmartBill series via
download-invoice-pdf- Fetch PDF via
GET /invoice/pdfusing CIF + series + number. --outputaccepts an absolute or relative.pdfpath. Relative paths are resolved against the current working directory. The resolved path must fall within an OpenClaw-allowed media root or the current working directory.
- Fetch PDF via
Payload Format
The invoice payload is a flat JSON object sent directly to the SmartBill API. See references/invoice-example.json for the canonical minimal example and references/smartbill-api.md for field documentation.
Both formats are accepted as input to the CLI:
- Bare invoice object:
{ "companyVatCode": "...", "client": {...}, ... } - Wrapped:
{ "invoice": { "companyVatCode": "...", "client": {...}, ... } }
The CLI unwraps automatically and sends the invoice object directly to the API.
Operational Rules
- Always use
--dry-runfirst to confirm the normalized payload before hitting the API. - Treat final invoice issuance (
isDraft: false) as a high-impact action requiring explicit user confirmation. - Set
client.saveToDb: falseandproducts[].saveToDb: falseto avoid persisting test data. - Preserve SmartBill response data (series, number, message) in run logs. Store
numberverbatim as returned — it is zero-padded (e.g."0123") and must never be stripped of leading zeros or cast to an integer. - Respect SmartBill rate limits: max 30 calls per 10 seconds.
References
- Read
references/smartbill-api.mdfor payload field reference, endpoint mapping, and auth/rate-limit notes. - Use
references/invoice-example.jsonas the canonical starting payload template.
Questions people ask
- What input formats does the CLI accept?
- Both bare invoice objects and wrapped { "invoice": {...} } payloads are accepted. The CLI automatically detects the format and unwraps it before sending to the SmartBill API.
- How do I test an invoice without creating one in SmartBill?
- Use --dry-run with create-invoice to print the normalized payload without calling the API. For payload structure validation, use validate-payload with --show-payload.
- What should I know about invoice numbers when downloading PDFs?
- Always use the exact number string returned by SmartBill — it is zero-padded (e.g. "0123"). Never strip leading zeros or convert to an integer. The CLI requires this verbatim string for the PDF download.
Related skills
Join video meetings as a voice bot, visual avatar, or avatar with live screen sharing.
Operate TaskTime Pro through MCP: manage tasks, track time, handle expenses, and prepare invoices from a paired browser session.
Detect when presentation language is steering your decision instead of the facts themselves.
Escape the scarcity trap — diagnose bandwidth consumption and design protected slack to restore strategic capacity.
Prioritize growth directions with a 2×2 risk framework — pick one bet and commit.
More from maverick
Browse all skillsRead permitted HubSpot data through a dynamically discovered, read-only MCP tool catalog.
Read and write PandaDoc workspace data through PandaDoc’s hosted MCP server.
Research X posts and users, search context, and execute individually confirmed X actions.
Read and update Linear workspace data through Linear’s hosted MCP server.
Read and manage WordPress.com content through its hosted MCP server and live tool catalog.
Discover and invoke Canva’s current MCP tools while respecting account permissions and confirmation boundaries.