Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added images/visa-purchase-approval/approved.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/visa-purchase-approval/consent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/visa-purchase-approval/verification.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions integrations/wallets/pay-with-card.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,28 @@ there's no general standing approval or spending-limit setting across these path
the recorded amount and merchant details don't restrict outgoing payment requests. an expiry or payment window isn't a single-use guarantee. follow the returned actions and expiry; don't treat this path as a standing spending authorization.
</Accordion>

### Approve a Visa purchase

your controller opens the returned `spend_approval` URL for the cardholder. the KERNEL-hosted page shows the merchant, amount, and card being used. the cardholder completes any verification Visa requests, then clicks **approve this purchase**. verification can use a passkey or a one-time code; the steps vary by card and session.

these screenshots show the actual hosted interface with test purchase data and simulated one-time-code verification. they don't show Visa's passkey window or a real network authorization.

<Frame caption="complete the verification requested for this purchase. this example uses a simulated one-time code.">
<img src="/images/visa-purchase-approval/verification.png" alt="KERNEL hosted approval showing the merchant, amount, card ending, and a field for the Visa verification code" />
</Frame>

<Frame caption="review the merchant, amount, and card, then explicitly approve the purchase.">
<img src="/images/visa-purchase-approval/consent.png" alt="KERNEL hosted approval with an approve this purchase button below the purchase summary" />
</Frame>

<Frame caption="approval lets your agent continue checkout. it does not submit the order or confirm a charge.">
<img src="/images/visa-purchase-approval/approved.png" alt="KERNEL hosted page confirming purchase approval" />
</Frame>

try the [hosted Visa approval sample app](https://github.com/kernel/cookbooks/tree/main/features/visa-purchase-approval). it keeps the API key on the server, creates one purchase, opens its returned approval link, and polls that purchase until it is ready to fill. you need an enrolled, eligible Visa payment method; the sample stops before merchant checkout submission.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Land the sample before publishing its link

If this documentation is published before kernel/cookbooks#12 merges, this main-branch URL returns a 404 and readers can't run the promised sample. The commit message explicitly identifies that ordering dependency, but nothing in this change enforces it, so land the cookbook change first or defer the link until the sample is available.

Useful? React with 👍 / 👎.


keep the approval URL outside the agent's context and deliver it only to the intended cardholder. after approval, retrieve the purchase and require `state.status === "ready"`, available funding, an unexpired `expires_at`, and an advertised `fill` operation before resuming checkout. the hosted Visa flow is separate from [embedded CVC collection](/integrations/wallets/embedded-card-cvc).

## Reference

- [enable payments in a browser agent](/browsers/enable-payments-in-browser-agent): the controller, agent, fill, and checkout walkthrough.
Expand Down
Loading