Checkout with the CLI
Give Shopstack a product and a spending limit. Follow the checkout in your terminal.
-
Select your user
Terminalshopstack profiles list shopstack profiles use NAMEUse a personal or end-user profile. A developer management profile must create an end user first.
-
Save the request
Put the product URL, customer details, currency, and spending limit in
JSON example & field reference →checkout.json. -
Run the checkout
Terminalshopstack checkout run --file checkout.jsonThe CLI shows status and activity as they change. If Shopstack needs a size, address detail, or other information, answer the terminal prompt.
With no payment provider selected, card entry uses a hidden terminal prompt. For an active Link connection, add
"payment_provider": "link"to the request. -
Review the exact total
The CLI displays subtotal, shipping, tax, and total. Missing values appear as
unavailable.CLI promptApprove this exact payment? [y/N]Enter
yoryesto approve. Any other answer declines. Your spending limit and card entry do not approve payment. -
Read the result
Progress goes to stderr. The final checkout object goes to stdout as JSON. Check
Result fields & failure handling →status, thenresultorfailure.
Create, inspect, or cancel separately
shopstack checkout create --file checkout.json
shopstack checkout get CHECKOUT_ID
shopstack checkout cancel CHECKOUT_IDcreate returns immediately. Save its checkout ID. get reads current state; cancel requests cancellation before submission.
run starts a new checkout. It does not resume an existing ID. If monitoring stops, inspect the saved ID before you create another checkout.