Repository navigation
Document embedded card capture for KERNEL wallets - #715
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
chruffins
left a comment
There was a problem hiding this comment.
One accuracy concern: the resend on pagehide/unmount is fire-and-forget and suppresses request failures, so it cannot guarantee the card is recorded. Could this say the component attempts a best-effort resend and reiterate that the backend must verify wallet state? The earlier completion section already recommends verification; this sentence currently overstates the guarantee.
|
|
||
| a `capture_token` lasts 30 minutes. when it expires, retrieve the wallet again from your backend; KERNEL returns a new `card_enrollment` action with a new `capture_token`. changing the component's `token` prop resets it. | ||
|
|
||
| if the cardholder leaves the page after creating a card but before KERNEL confirms it, the component sends the card once more as it unmounts, so the card isn't left unrecorded. |
There was a problem hiding this comment.
This resend is best-effort: the component ignores failures from the unmount/pagehide request, so the card can still remain unrecorded. Please phrase this as an attempt rather than a guarantee (and point readers to the backend wallet-state check).
Summary
Adds Embedded Card Capture under Payments: how to collect a card for a KERNEL wallet (
provider: "kernel") on your own branded page withKernelCardCapturefrom@onkernel/vault-react, instead of the hostedcard_enrollmentpage.The page covers:
action.capture_token(TypeScript and Python)fieldCssfor the VGS iframes, andlabels(with a note that the defaults are KERNEL's copy)spend_approvalpageDo not merge yet
This documents unreleased behavior. Merge only after:
capture_tokenand cross-origin card capture is deployed.@onkernel/vault-reactrelease that includesKernelCardCaptureis published (the latest on npm, 0.2.0, doesn't include it).capture_tokenon thecard_enrollmentaction, so the TypeScript and Python examples type-check.Testing
mint devrenders the page;mint broken-linksreports no broken links.capture_tokenisn't in the SDKs yet.Note
Low Risk
Documentation-only changes with no runtime or API code; integrators may rely on unreleased
capture_tokenand package behavior until those ship.Overview
Adds Embedded Card Capture to the Payments docs nav and a new guide for collecting KERNEL wallet cards on integrators’ own pages via
@onkernel/vault-react’sKernelCardCapture, instead of the hostedcard_enrollmentURL.The page documents the end-to-end flow: backend wallet creation and
action.capture_token, React integration (props, direct browser API calls), styling via class hooks andfieldCssfor VGS iframes, required CSP allowances, backend wallet confirmation afteronComplete, fixedonErrorcodes, 30-minute token renewal, and security handling for the capability token. It also notes that Visaspend_approvalremains KERNEL-hosted while only card enrollment is embeddable.Reviewed by Cursor Bugbot for commit 2ccb56f. Bugbot is set up for automated code reviews on this repo. Configure here.