Skip to main content

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.
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:

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:
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:
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.