Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rako.sh/llms.txt

Use this file to discover all available pages before exploring further.

Runnable Examples

Use these examples when you want a local hello-world path before connecting to a non-mock Rako API key. They use placeholder credentials, deterministic mock offers, and a reserved .invalid checkout URL.
These examples do not process payment, collect payment details, promise conversion or payout, or mutate production/live data.

Fastest local path

  1. Start the mock AAP server.
  2. Run the JavaScript or Python SDK example against it.
  3. Read the MCP transcript for the canonical agent-tool sequence.
# Terminal 1
cd examples/mock-aap-server
npm install
AAP_API_KEY=aap_demo_key npm run start
# Terminal 2: JavaScript/TypeScript
cd examples/js-sdk-basic
npm install
AAP_API_KEY=aap_demo_key AAP_API_URL=http://localhost:3456 npm run start
# Terminal 2: Python
cd examples/python-sdk-basic
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
AAP_API_KEY=aap_demo_key AAP_API_URL=http://localhost:3456 python main.py
The pip upgrade is intentional for fresh local virtualenvs; editable pyproject.toml installs need modern pip support. uv venv .venv && source .venv/bin/activate && uv pip install -e . is the equivalent uv path. Expected SDK output includes a mock offer, a mock recommendation ID, and:
Checkout URL: https://checkout.example.invalid/mock

If port 3456 is already in use

If the mock server exits with EADDRINUSE, pick another local port and point the clients at the same URL:
# Terminal 1
cd examples/mock-aap-server
PORT=45680 AAP_API_KEY=aap_demo_key npm run start
# Terminal 2
AAP_API_KEY=aap_demo_key AAP_API_URL=http://localhost:45680 npm run start
Use the same AAP_API_URL value for the JavaScript and Python examples.

MCP tool sequence

For MCP-compatible clients, the canonical checkout-link flow is:
search_offers -> get_checkout_requirements -> get_checkout_link
The mock transcript lives in the examples directory and is designed to be read before wiring a client to a non-mock API endpoint.

MCP agent flow tutorial

Read the step-by-step version of the mock transcript and checkout-link handoff boundary.

Example directories

Mock conversion artifact

Understand how the fake conversion payload relates to checkout-link creation.