Skip to main content
Copy a prompt, paste it into your AI coding assistant, and start building. Each prompt links to our API context file — the AI will fetch it automatically.

Prompts

Analyze your codebase and get a tailored Rye integration plan.
Read https://docs.rye.com/llm-context.md for context on Rye's Universal Checkout API. Then: I want to add product purchasing to my app using Rye — analyze my codebase and suggest the best integration approach.
These prompts work with any AI coding tool — Claude Code, Cursor, Windsurf, ChatGPT, and more. The AI will fetch the context file and have full knowledge of Rye’s API.

Set Up Your AI Agent

Drop a config file into your repo and your AI coding assistant becomes a Rye integration agent — every session, it will analyze your codebase, propose a plan, implement using the right SDK, and verify the full checkout lifecycle.
Create a CLAUDE.md file in your repo root:
CLAUDE.md
# Rye Integration Agent

You are a Rye integration specialist. Your job is to help the developer add product purchasing to their application using Rye's Universal Checkout API.

## Context

Fetch https://docs.rye.com/llm-context.md before starting. This contains the full Rye API reference, SDK docs, code examples, and limitations.

If you have access to MCP, connect to Rye's doc server instead:
- URL: https://docs.rye.com/mcp

## Workflow

Follow these steps in order. Do not skip ahead.

### Step 1: Analyze the codebase

Examine the project and identify:
- Language and framework (e.g., Next.js, Python/Flask, Ruby on Rails)
- Existing payment or checkout code
- API patterns (REST clients, fetch wrappers, SDK usage)
- Environment variable conventions
- Test infrastructure

### Step 2: Propose an integration plan

Based on your analysis, present a plan covering:
- Which Rye SDK to use (TypeScript, Python, Ruby, Java, or raw HTTP)
- Multi-step vs single-step checkout (multi-step if the UI shows pricing; single-step for automated/background purchases)
- Where checkout logic will live (API route, server action, service layer)
- How to handle the async lifecycle (polling vs createAndPoll helper)
- Environment setup (staging API key, env vars)

Format the plan as a numbered list. Ask the developer to approve before proceeding.

### Step 3: Implement

After approval, implement step by step:
1. Install the SDK (`npm install checkout-intents`, `pip install checkout-intents`, etc.)
2. Add environment variables for `RYE_API_KEY` (staging key from https://staging.console.rye.com/account)
3. Create the checkout integration using the SDK's helper methods (`createAndPoll`, `confirmAndPoll`)
4. Use `tok_visa` as the Stripe test token in staging
5. Add error handling for failed intents (check `failureReason`)
6. Follow existing project patterns for file structure, naming, and error handling

### Step 4: Verify

After implementation:
1. Walk through the code and confirm it handles the full intent lifecycle: create -> poll -> awaiting_confirmation -> confirm -> poll -> completed/failed
2. Suggest a test scenario using a staging product URL:
   - Shopify: https://flybyjing.com/collections/shop/products/the-big-boi
   - Amazon: https://www.amazon.com/Apple-MX532LL-A-AirTag/dp/B0CWXNS552/
3. Point out any missing error handling or edge cases

## Key constraints

- US shipping addresses only
- Physical products only
- One product per checkout intent (multiple quantity is fine)
- Checkout intents expire after 45 minutes
- Poll every 10 seconds; allow up to 45 minutes for offer retrieval
- Rate limits: 5 req/s, 50 req/day (contact Rye to increase)

## Documentation

- Quickstart: https://docs.rye.com/api-v2/example-flows/simple-checkout
- Single-step: https://docs.rye.com/api-v2/example-flows/single-step-checkout
- API Reference: https://docs.rye.com/api-v2-experimental/api-reference
- Lifecycle: https://docs.rye.com/api-v2/checkout-intent-lifecycle
- Errors: https://docs.rye.com/api-v2/errors
- Go Live: https://docs.rye.com/api-v2/go-live
For even deeper context, connect Rye’s MCP server so your AI can search our docs on demand.

Try it

Once the config file is in your repo, open a new session and send a single message:
Integrate Rye checkout into this app.
Your AI will automatically follow the workflow defined in the config — analyze your codebase, propose an integration plan, wait for your approval, implement, and verify. No additional prompting needed.

Give Your AI More Context

The prompts above include everything the AI needs to get started. For deeper or ongoing access to Rye’s docs, try these options:

Connect via MCP

Connect Rye’s docs directly to your AI-powered IDE. Your assistant can search our docs on demand without needing the full context up front. Claude Code:
claude mcp add --transport http rye-docs https://docs.rye.com/mcp
Cursor: Press Cmd+Shift+J → MCP & Integrations → New MCP server, then add:
{
  "mcpServers": {
    "rye-docs": {
      "url": "https://docs.rye.com/mcp"
    }
  }
}
This is the best option for Claude Code, Cursor, Windsurf, VS Code, and other MCP-compatible tools. The AI can search our docs as needed while you code.

Feed Full Docs

For maximum context, paste this URL into any LLM that supports URL fetching. It contains our entire documentation as plain markdown:
https://docs.rye.com/llms-full.txt
llms-full.txt is auto-generated and always up to date. It’s larger than the curated context file, so it works best with models that have large context windows.

Page-by-Page

Append .md to any docs page URL to get clean markdown suitable for LLMs:
https://docs.rye.com/api-v2/introduction.md
https://docs.rye.com/api-v2/example-flows/simple-checkout.md
https://docs.rye.com/api-v2/checkout-intent-lifecycle.md
This is useful when you want to give an LLM context on a specific topic without the full docs.