6. Command Line and API
The Stripe CLI and the API reach the same live account as the Dashboard.
| Fact | Practice |
|---|---|
| Test mode is the default | The CLI works in test mode unless --live is passed. A lookup of a real invoice made without it finds nothing and reports no error. |
| Lines are separate | stripe invoices retrieve <id> --expand lines --live returns an invoice with its line items. Some tools list invoices without their lines. |
| Keys | Invoices are written with a restricted key limited to invoicing. |
| Secrecy | Keys are never printed, logged or written into notes. A note names the key and where it is stored. |
Verified November 27, 2026 against Stripe's documentation and the firm's records. References