How it works

One prompt. A tested integration. A pull request.

Paste the prompt into the coding agent you already use. It reads your app, asks you for test keys, builds the integration on a branch and proves it with a real test payment before it hands you the pull request.

The setup prompt

Set up Knox payments in this repository. Fetch and read https://docs.knoxapi.com/agent-setup/prompt.md, then follow its sandbox integration workflow. Detect whether this is a fresh app, an existing Stripe integration, or another processor; perform the corresponding integration or migration yourself. Keep credentials out of chat and source code, preserve existing payment flows, and verify the integration before reporting success.

Paste it into Claude Code, Codex, Cursor or your coding agent. It points the agent at prompt.md, Knox's full instructions.

The loop

Read. Ask. Build. Prove. Run. Learn.

Your agent takes the first four steps and hands you a pull request. Knox takes the last two, for every payment after you merge it.

  1. Read

    Your agent

    It reads your app first.

    It reads Knox's llms.txt and OpenAPI document, then your checkout flow, order totals, fulfillment and test commands.

    Knox's preflight script reports which payment providers the code uses, as file and line signals, never source or secrets. Each starting point has its own path, and all three end in the same verified integration.

  2. Ask

    You and your agent

    It asks before it holds a key.

    The agent sends Knox your account email and shows you a code and an approval link. Knox emails you the link, never the code.

    You sign in and type the code. The agent receives one named test key, once. Requests expire after 15 minutes.

  3. Build

    Your agent

    It builds on a branch.

    It points the official Stripe SDK at Knox, creates PaymentIntents with an idempotency key per order, mounts the card fields from knox.js, and verifies webhooks signed with Stripe-Signature.

    Card numbers never reach your page or your server: they're tokenized and held in a secure vault. Keys stay in your environment or secret store.

  4. Prove

    Your agent and Knox

    Ready means proven.

    The agent runs a test checkout through the card fields and confirms the signed webhook fulfills the order.

    Then it asks Knox's integration_status for ready: true with every check passed, reviews its own diff, writes an integration report and hands you the branch.

    Principle: proof before privilege.

  5. Run

    Knox

    Knox runs it, payment after payment.

    Connect your own processor accounts, then pick a rule: priority, volume split, or conditions on currency and amount. Knox routes each payment to Stripe, Fiserv, NMI, or Paysafe accordingly.

    Activating a rule replaces the one before it, so your payment code never changes.

    Rules, gateways and traffic live in Meta Knox, Knox's routing workspace.

  6. Learn

    Knox

    It remembers every quirk.

    Every decline code Knox translates into Stripe's and every error its payment core returns is recorded, in one memory shared across merchants.

    Knox's integration memory keys each sighting by source, kind and signature, so a quirk seen a thousand times is one entry with its first and last sighting.

Step 02, in detail

You approve every key by typing a code

Your agent never asks you to paste a secret. It requests a test key, and you approve it in the Knox dashboard. Requests expire after 15 minutes.

  1. Agent

    Asks for test keys

    Your agent sends Knox your account email with POST /knox/v1/agent/key_requests.

  2. Agent

    Shows you a code and a link

    It shows a code like KNX-7Q4P-M2XA and an approval link.

  3. You

    Get an email

    Knox emails you the same link, but not the code.

  4. You

    Sign in and type the code

    With a Knox account, sign in, open the link and type the code your agent is showing.

  5. Agent

    Receives a restricted test key, once

    The agent receives a restricted rk_test_ key named "Agent: <name> (<repository>)" exactly once, scoped to what an integration needs: payments, customers, refunds, webhooks and events. You see the scope before you approve, and you can revoke it on its own.

Knox never sends you this code

"Only approve if you just started this from your own coding agent. Knox never sends you this code. If someone else gave it to you, deny the request."

Prefer to handle keys yourself? Create test keys in the dashboard and put them in your environment or secret store.

Ground rules

What your agent will and won't do

These rules come from Knox's own instructions to your agent, not from a setting you have to remember.

It will

  • Work on a new branch and leave unrelated changes alone
  • Read keys from your environment or secret store
  • Use the official Stripe SDK and Knox's hosted card fields
  • Verify every webhook's Stripe-Signature
  • Run your tests, then a test payment end to end
  • Review its own diff and run your secret scanner
  • Write an integration report and hand you the branch

It won't

  • Ask you to paste a secret into the chat
  • Print, commit or log your keys
  • Build raw card inputs on your site
  • Use live keys
  • Deploy, or move live traffic
  • Change your global agent configuration
  • Invent install commands, packages or MCP URLs

For agents

What your agent reads

  • llms.txt

    Knox's llms.txt

    The base URL, authentication, SDK settings, webhook verification, how to request test keys, links to agent setup, and every Stripe operation Knox serves.

  • prompt.md

    The setup prompt

    Ready-made instructions for your agent. It installs the knox-integrate skill in your repository, then integrates and verifies in test mode.

  • SKILL.md

    The knox-integrate skill

    The steps from inspecting your app to a reviewable branch, and the rules: keys from your environment, no card numbers on your server, and test mode only.

  • knox.json

    API reference

    The OpenAPI document for exactly the operations Knox serves, with Stripe's own schemas.

Your agent is ready when you are.

Paste the prompt into your coding agent, or start a test account and look around first. Live payments are available by request.

Talk to sales about going live