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

bashANYcustomerscreate
bash
stripe customers create --name "Ada Lovelace" --email ada@example.com

Create customer with phone

bashANYcustomerscreate
bash
stripe customers create --name "Ada Lovelace" --email ada@example.com --phone +15555550123

List customers

bashANYcustomerslist
bash
stripe customers list --limit 20

Retrieve customer

bashANYcustomersretrieve
bash
stripe customers retrieve cus_123

Update customer metadata

bashANYcustomersupdatemetadata
bash
stripe customers update cus_123 --metadata plan=pro --metadata source=cli

Delete customer

bashANYcustomersdelete
bash
stripe customers delete cus_123

Products and Prices

Create product

bashANYproductscreate
bash
stripe products create --name "Pro Plan" --description "Monthly plan"

List products

bashANYproductslist
bash
stripe products list --limit 20

Deactivate a product

bashANYproductsupdate
bash
stripe products update prod_123 --active false

Create one-time price

bashANYpricescreate
bash
stripe prices create --unit-amount 3000 --currency usd --product prod_123

Create recurring yearly price

bashANYpricessubscriptions
bash
stripe prices create --unit-amount 19900 --currency usd --product prod_123 --recurring interval=year

List prices for a product

bashANYpriceslist
bash
stripe prices list --product prod_123 --limit 20

Payments, Checkout, and Refunds

Create payment intent

bashANYpayment-intentscreate
bash
stripe payment_intents create --amount 5000 --currency usd

Create payment intent for customer

bashANYpayment-intentscustomer
bash
stripe payment_intents create --amount 5000 --currency usd --customer cus_123

Capture authorized payment intent

bashANYpayment-intentscapture
bash
stripe payment_intents capture pi_123

Cancel payment intent

bashANYpayment-intentscancel
bash
stripe payment_intents cancel pi_123

Create checkout session

bashANYcheckoutsessions
bash
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

bashANYcheckoutsessionsretrieve
bash
stripe checkout sessions retrieve cs_test_123

Refund by payment intent

bashANYrefunds
bash
stripe refunds create --payment-intent pi_123

Partially refund a payment

bashANYrefundspartial
bash
stripe refunds create --payment-intent pi_123 --amount 1500

Subscriptions and Invoices

Create subscription

bashANYsubscriptionscreate
bash
stripe subscriptions create --customer cus_123 --items price=price_123

List subscriptions

bashANYsubscriptionslist
bash
stripe subscriptions list --limit 20

Cancel subscription

bashANYsubscriptionscancel
bash
stripe subscriptions cancel sub_123

List invoices

bashANYinvoiceslist
bash
stripe invoices list --limit 20

Pay an invoice

bashANYinvoicespay
bash
stripe invoices pay in_123

Create invoice item

bashANYinvoice-itemsbilling
bash
stripe invoiceitems create --customer cus_123 --amount 1200 --currency usd --description "Support fee"

Recommended next

No recommendations yet.