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-Key header, 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" });

Testing

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_amex
  • pm_card_chargeDeclined
  • pm_card_chargeDeclinedInsufficientFunds
  • pm_card_createDispute
  • pm_card_mastercard
  • pm_card_threeDSecure2Required
  • pm_card_threeDSecureOptional
  • pm_card_threeDSecureRequiredChargeDeclined
  • pm_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.

webhook.js
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.

Talk to sales about going live