03 Build stepThis is the API your agent wires in: the same Stripe calls your team already knows.
Payments
The Stripe API you know, served by Knox.
Create, confirm and refund PaymentIntents with the Stripe SDK you already use, pointed at Knox.
- Stripe API operations
- 406
- Pinned Stripe API version
- 2026-08-26.dahlia
- Stripe test payment methods
- 9
API coverage
Same requests. Same responses.
Knox serves 406 Stripe API operations at API version 2026-08-26.dahlia. Knox's OpenAPI document is Stripe's own spec, cut down to exactly those operations.
PaymentIntents and refunds
Create, confirm and refund PaymentIntents with the same calls you make to Stripe today.
Idempotent retries
Knox honors the
Idempotency-Keyheader, so a retried request does not create a second payment.An OpenAPI document
The API reference lists every operation Knox serves, with Stripe's own request and response schemas.
Stripe SDKs
Point the Stripe SDK at Knox
Keep the official Stripe library. Change the API address and use your Knox key; the rest of your integration stays as it is.
server.js
import Stripe from "stripe";Removed: const stripe = new Stripe(process.env.STRIPE_SECRET_KEY);Added: const stripe = new Stripe(process.env.KNOX_SECRET_KEY, { host: "api.knoxapi.com" });payments.py
import osimport stripeAdded: KNOX_API_BASE = "https://api.knoxapi.com"Removed: client = stripe.StripeClient(os.environ["STRIPE_SECRET_KEY"])Added: client = stripe.StripeClient(os.environ["KNOX_SECRET_KEY"], base_addresses={"api": KNOX_API_BASE})config/initializers/stripe.rb
require "stripe"Removed: Stripe.api_key = ENV["STRIPE_SECRET_KEY"]Added: Stripe.api_key = ENV["KNOX_SECRET_KEY"]Added: Stripe.api_base = "https://api.knoxapi.com"Terminal
Removed: curl https://api.stripe.com/v1/payment_intents -u $STRIPE_SECRET_KEY: \Added: curl https://api.knoxapi.com/v1/payment_intents -u $KNOX_SECRET_KEY: \ -d amount=2000 -d currency=usdTesting
Test with the cards you already use
Stripe's test payment methods, tok_ test tokens and Stripe test card numbers work in Knox test mode. Knox accepts only test card numbers.
Test payment methods
pm_card_amexpm_card_chargeDeclinedpm_card_chargeDeclinedInsufficientFundspm_card_createDisputepm_card_mastercardpm_card_threeDSecure2Requiredpm_card_threeDSecureOptionalpm_card_threeDSecureRequiredChargeDeclinedpm_card_visa
Webhooks
Webhooks signed with Stripe-Signature
Knox signs every webhook event the way Stripe does. Verify it with the Stripe SDK's webhook helper and your Knox endpoint secret.
const event = stripe.webhooks.constructEvent(
rawBody,
request.headers["stripe-signature"],
process.env.KNOX_WEBHOOK_SECRET,
);
if (event.type === "payment_intent.succeeded") fulfill(event.data.object);What doesn't move automatically
Pointing your SDK at Knox changes where new API calls go. Saved cards, object IDs and subscriptions in your Stripe account do not move to Knox, and neither do customers. Plan for them before you switch existing traffic.
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.