- An AI API key (OpenAI, Anthropic, or any OpenAI-compatible provider)
- An AI coding agent (Cursor, Claude Code, or Windsurf)
Open Terminal and run:
git clone git@github.com:juspay/connector-service.git
cd connector-service
git clone git@github.com:juspay/grace.gitYour folder should now look like:
connector-service/
├── backend/ ← Rust connector code
├── config/ ← Server configs
├── grace/ ← Grace CLI + codegen rules
└── ...
cd grace
uv sync # if uv not installed: pip install uv
source .venv/bin/activate
grace --helpIf you see a list of commands (techspec, research, pr...) — you're good!
Note: You need to run
source .venv/bin/activateevery time you open a new terminal window. You'll see(.venv)at the start of your prompt when it's active.
cp .env.example .envOpen .env in any text editor and update these lines:
AI_API_KEY=your_api_key_here
AI_BASE_URL=https://grid.ai.juspay.net
AI_MODEL_ID=openai/qwen3-coder-480bAI_API_KEY=sk-proj-...
AI_BASE_URL=https://api.openai.com/v1
AI_MODEL_ID=openai/gpt-4oAI_API_KEY=sk-ant-...
AI_BASE_URL=https://api.anthropic.com/v1
AI_MODEL_ID=anthropic/claude-sonnet-4-20250514Set one of:
FIRECRAWL_API_KEY=your_key_here
USE_PLAYWRIGHT=falseSave and close the file.
grace techspec myconnector -f /path/to/api-docs -vgrace techspec myconnector -eReplace myconnector with the actual name (e.g. stripe, adyen).
Output: rulesbook/codegen/references/specs/myconnector.md
Important: Go back to the connector-service root folder (not grace/)
Open connector-service/ in your AI coding agent (Cursor / Claude Code / Windsurf) and tell it:
integrate MyConnector using grace/rulesbook/codegen/.gracerules
The AI agent will automatically run through these phases:
- Foundation → scaffolds files, auth, module registration
- Authorize → payment authorization flow
- PSync → payment status sync
- Capture → capture authorized payments
- Refund → full & partial refunds
- RSync → refund status sync
- Void → cancel authorized payments
- Quality → scores implementation (must be ≥ 60)
This takes several minutes. Let it finish.
From the connector-service root:
cargo buildNo errors = your connector is ready!
add Refund flow to Stripe using grace/rulesbook/codegen/.gracerules_add_flow
add SetupMandate and RepeatPayment flows to Stripe using grace/rulesbook/codegen/.gracerules_add_flow
add Wallet:Apple Pay,Google Pay and Card:Credit,Debit to Stripe using grace/rulesbook/codegen/.gracerules_add_payment_method