Example: Claude Code
This walkthrough shows a complete Claude Code session where the user asks the agent to sell a file. The agent handles account setup, listing creation, and readiness resolution autonomously — asking the user only when human action is required.
The scenario
The user has an ebook PDF in their S3 bucket and wants to sell it for $19. They have not set up a ListBee account yet. They do have a Stripe account.
Step 1: Check for an existing API key
The agent checks the environment for a ListBee API key before doing anything else.
Agent says to user:
I don’t see a ListBee API key in your environment. I’ll create an account for you. What’s your email address?
User says:
Step 2: Create the account
Agent says:
Check your inbox for a 6-digit code from ListBee. What is it?
User says:
847213
Agent says:
Account created. Add this to your
.envfile so I can find it next time:
Step 3: Check readiness and handle Stripe
The next action is kind: "api" — the agent can handle it without a browser.
Agent says:
To accept payments, I need your Stripe secret key. You can find it at https://dashboard.stripe.com/apikeys. It starts with
sk_live_orsk_test_.
User says:
sk_live_51Abc123…
Agent says:
Stripe connected. Your account is ready to accept payments.
Step 4: Create the listing
Step 5: Check listing readiness
Agent says to user:
Your ebook is live. Share this URL with buyers:
https://buy.listbee.so/r7kq2xy9
When someone pays $19, they receive the PDF by email automatically.
Full script
Next steps
- Example: n8n workflow — automate listing creation and order notifications.
- Claude Code skill — teach Claude Code to use ListBee without explaining the API each time.