Start here
Build with an AI assistant
Let an AI coding assistant add Cycle to your app: it connects your account with a code, creates your plans, adds checkout, webhooks and the customer portal, and tests every case in test mode.
How it works
- Install. One line adds the Cycle skill to Claude Code. Other assistants (Cursor, Codex, Windsurf, GitHub Copilot) read the same instructions from the plain-text guide.
- Ask. Tell it: "Add Cycle subscriptions to my app." Any language, any framework: the API is plain HTTPS, with no library to install.
- Allow. It opens Cycle in your browser with a short code. Check the code matches the one in your terminal and press Allow. It gets a test-mode key for the business you pick.
Install the skill for Claude Code
Run this in a terminal on macOS, Linux or WSL. It puts the skill in ~/.claude/skills/cycle:
Terminal
mkdir -p ~/.claude/skills && curl -fsSL https://cycle.am/ai/cycle-skill.zip -o /tmp/cycle-skill.zip && unzip -oq /tmp/cycle-skill.zip -d ~/.claude/skills && rm /tmp/cycle-skill.zipThen start Claude Code in your project and ask it to add Cycle. For any other assistant, give it this link: https://cycle.am/ai/guide.md.
What it builds
- Your plans: products and prices in AMD, USD or EUR, monthly or yearly, with an optional free trial.
- A Subscribe button that opens a checkout session. The card is typed on the bank's page, never in your app.
- Webhooks that keep access in step with payments: checkout completed, renewals, failed payments, recoveries and cancellations, each signature checked.
- "Manage subscription": a link to the customer portal, where customers change their card, switch plan or cancel.
- A test run of every case in test mode: a paid checkout, a declined card, a trial, a renewal, a failed renewal and its recovery, a cancellation and a forged webhook.
It asks, it doesn't guess
Business rules stay yours. The assistant asks, suggests a default and writes your answer down:
| Question | Suggested answer |
|---|---|
| Your plans: names, prices, currency, period and trial? | What you sell today. |
| When a renewal fails, Cycle retries the card for about 9 days. Does the customer keep access meanwhile? | Keep access and show a notice asking them to update their card. |
| When the last retry fails, Cycle cancels the subscription. What then? | End access. |
| Customers cancel in the portal and keep what they paid for until the period ends. Is that right? | Keep access until the period ends. |
Safe by design
- Test mode only. The assistant gets a
sk_test_…key. Real payments start only after you connect your bank and go live in the dashboard, which an assistant can't do. - The secret key stays on your server, in a git-ignored environment file: never in the browser or in git.
- No card form in your app. Customers type their card on their bank's page.
- You can disconnect it any time: see below.
Connect with a code
The flow the skill uses, for anyone building their own tool. No key is needed: the device_code is the app's secret.
POST /api/v1/connectwith{"client_name": "My tool"}. You getdevice_code,user_code,verification_url_complete,intervalandexpires_in(10 minutes).- Show the
user_codeand openverification_url_completein the person's browser. They sign in, pick a business, check the code and press Allow or Deny. - Every
intervalseconds,POST /api/v1/connect/tokenwith{"device_code": "…"}. Until they decide you get400witherror: authorization_pending(orslow_downif you poll too fast). After Allow, one200withsecret_key(test mode),businessandapi_base. After Deny:access_denied; when the time is up:expired_token.
cURL
curl -X POST https://cycle.am/api/v1/connect -H "Content-Type: application/json" -d '{"client_name": "My tool"}'
curl -X POST https://cycle.am/api/v1/connect/token -H "Content-Type: application/json" -d '{"device_code": "cdc_…"}'Disconnect an assistant
Under Developers → Build with AI → Connected apps you see every app you allowed, who allowed it and when it was last used. Disconnect revokes its key at once. Its keys are also listed under Keys & webhooks.