Stripe CLI Resource Management

Resource CRUD patterns for customers, products, prices, payment intents, checkout sessions, refunds, and subscriptions.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all
## Customers
Create customer
stripe customers create --name "Ada Lovelace" --email ada@example.com
Create customer with phone
stripe customers create --name "Ada Lovelace" --email ada@example.com --phone +15555550123
List customers
stripe customers list --limit 20
Retrieve customer
stripe customers retrieve cus_123
Update customer metadata
stripe customers update cus_123 --metadata plan=pro --metadata source=cli
Delete customer
stripe customers delete cus_123
## Products and Prices
Create product
stripe products create --name "Pro Plan" --description "Monthly plan"
List products
stripe products list --limit 20
Deactivate a product
stripe products update prod_123 --active false
Create one-time price
stripe prices create --unit-amount 3000 --currency usd --product prod_123
Create recurring yearly price
stripe prices create --unit-amount 19900 --currency usd --product prod_123 --recurring interval=year
List prices for a product
stripe prices list --product prod_123 --limit 20
## Payments, Checkout, and Refunds
Create payment intent
stripe payment_intents create --amount 5000 --currency usd
Create payment intent for customer
stripe payment_intents create --amount 5000 --currency usd --customer cus_123
Capture authorized payment intent
stripe payment_intents capture pi_123
Cancel payment intent
stripe payment_intents cancel pi_123
Create checkout session
stripe checkout sessions create --mode payment --success-url https://example.com/success --cancel-url https://example.com/cancel --line-items price=price_123,quantity=1
Retrieve checkout session
stripe checkout sessions retrieve cs_test_123
Refund by payment intent
stripe refunds create --payment-intent pi_123
Partially refund a payment
stripe refunds create --payment-intent pi_123 --amount 1500
## Subscriptions and Invoices
Create subscription
stripe subscriptions create --customer cus_123 --items price=price_123
List subscriptions
stripe subscriptions list --limit 20
Cancel subscription
stripe subscriptions cancel sub_123
List invoices
stripe invoices list --limit 20
Pay an invoice
stripe invoices pay in_123
Create invoice item
stripe invoiceitems create --customer cus_123 --amount 1200 --currency usd --description "Support fee"

Recommended next

No recommendations yet.