03 Build stepRather not host a payment form at all? Create a session and send your customer to Knox's page.
Checkout
A hosted payment page for your Checkout Sessions.
Create a Checkout Session with the Stripe SDK, send your customer to its url, and Knox's hosted page takes the payment. Available in test mode.

Checkout Sessions
Stripe-compatible sessions
Use the Checkout Sessions API you know: payment and setup modes, line items from prices or price_data, and the hosted page. Sessions expire after 24 hours unless you set expires_at between 30 minutes and 24 hours.
curl https://api.knoxapi.com/v1/checkout/sessions -u $KNOX_SECRET_KEY: \
-d mode=payment \
-d "line_items[0][price]=price_..." \
-d "line_items[0][quantity]=1" \
--data-urlencode "success_url=https://shop.example/done?id={CHECKOUT_SESSION_ID}" \
--data-urlencode "cancel_url=https://shop.example/cart"Redirect contract
Your customer comes back where you expect
success_url- After payment, Knox sends the customer to your
success_url, with{CHECKOUT_SESSION_ID}replaced by the session's id. cancel_url- The back link next to your business name returns the customer to your
cancel_url. - Absolute URLs
- Both must be absolute
httporhttpsURLs. Knox refuses any other kind.
Behavior
Built for phones, authentication and retries
Responsive layout
Two columns from 992 px wide, one column below. At 390 px and narrower the form runs full width with 16 px gutters, and fields are 44 px tall with 16 px text.
3-D Secure
Cards that need authentication go through 3-D Secure and return to the checkout page, which shows the result. 3-D Secure for setup-mode sessions is not supported yet.
Safe retries
Each session has one PaymentIntent. A retry after a network error reuses the same idempotency key, and a session that is already paid completes instead of charging again.
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.