Knox developer docs Test mode
Paste one prompt into your coding agent.
Your agent reads Knox's setup guide, inspects your app, integrates payments or migrates your existing Stripe or processor code, and verifies the sandbox integration before it reports back.
Works with Claude Code, Codex, Cursor and other coding agents. Credentials stay out of chat.
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.Using Meta Knox routing instead?
Set up Meta Knox routing in this repository. Fetch and read https://docs.knoxapi.com/agent-setup/prompt.md?product=meta, then follow its sandbox integration workflow. Inspect the app first, Keep credentials out of chat and source code, preserve existing payment flows, and verify the integration before reporting success.Start here
Everything your agent reads, you can read too.
API reference
Every supported operation with parameters, request samples and example responses.
Explore the referencellms.txt
The integration guide for coding agents: base URL, auth, SDK setup and operations.
Read llms.txtAgent skills
Project skills for Claude Code and Codex, migration workflows and helper tools.
Set up your agentOpenAPI document
The exact operations and schemas Knox serves, for code generators and tools.
Download the spec
By hand
Make your first request
Knox answers a subset of Stripe's API with identical requests and responses, so a Stripe SDK works once it points at Knox.
- Get a test key. Sign in to the dashboard and open
API keys. Keep your
sk_test_...secret key on your server. - Point your SDK at Knox. Send requests to
https://api.knoxapi.com; the request format is unchanged. - Use test payment methods.
pm_card_visasucceeds andpm_card_chargeDeclineddeclines. - Fulfil from webhooks. Verify the
Stripe-Signatureheader with the SDK's webhook helper and your endpoint secret.
Test mode. Live processing is currently disabled. Never send real card numbers.
curl https://api.knoxapi.com/v1/payment_intents \
-H "Authorization: Bearer $KNOX_SECRET_KEY" \
-H "Idempotency-Key: your-unique-order-id" \
-d amount=1200 \
-d currency=usd \
-d payment_method=pm_card_visa \
-d confirm=trueconst Stripe = require('stripe');
const stripe = new Stripe(process.env.KNOX_SECRET_KEY, {host: 'api.knoxapi.com'});
const paymentIntent = await stripe.paymentIntents.create({
amount: 1200,
currency: 'usd',
payment_method: 'pm_card_visa',
confirm: true,
}, {idempotencyKey: 'your-unique-order-id'});import os
import stripe
client = stripe.StripeClient(
os.environ["KNOX_SECRET_KEY"],
base_addresses={"api": "https://api.knoxapi.com"},
)
payment_intent = client.v1.payment_intents.create(
params={
"amount": 1200,
"currency": "usd",
"payment_method": "pm_card_visa",
"confirm": True,
},
options={"idempotency_key": "your-unique-order-id"},
)require 'stripe'
Stripe.api_key = ENV['KNOX_SECRET_KEY']
Stripe.api_base = 'https://api.knoxapi.com'
payment_intent = Stripe::PaymentIntent.create({
amount: 1200,
currency: 'usd',
payment_method: 'pm_card_visa',
confirm: true,
}, {idempotency_key: 'your-unique-order-id'})Routing
Configure routing with Meta Knox
Meta Knox is a separate product. Its control API is https://meta.knoxapi.com/v1; routing configuration is not
exposed on the Stripe-compatible API host. Use GET /v1/gateways to inspect processors and
POST /v1/routing_rules to create routing configurations.
curl https://meta.knoxapi.com/v1/routing_rules \
-H "Authorization: Bearer $KNOX_SECRET_KEY"