Skip to main content
use provider: "kernel" to collect a user’s existing card for browser purchases. KERNEL manages the provider connection; you don’t need your own vgs account.
this page covers a wallet with one card, which every organization gets by default. where pay with multiple cards are enabled, a new wallet starts empty and connected, and you add each card with add_payment_method instead of the wallet’s card_enrollment action.

Connect a card

  1. create a vault and a wallet item with spec.provider: "kernel".
  2. open the returned card_enrollment action for the cardholder. the hosted page collects their card and email. for card entry on your own domain, use embedded card capture.
  3. retrieve the wallet and inspect its payment_methods expansion. a connected wallet means the card is stored, not necessarily eligible to pay.
card details go directly to very good security (vgs) through hosted fields. vgs stores the original card; KERNEL receives a card reference and metadata rather than the original card number. request pci compliance documents through vgs’s trust center.

Make a purchase

  1. attach the vault when you create the browser.
  2. create a card item for the purchase, referencing the wallet and the merchant, amount, and currency. visa cards also require merchant_country, the merchant’s two-letter country code. without spec.payment_method_id, the purchase uses the wallet’s default card, card; to choose another card, see pay with multiple cards.
  3. invoke the advertised authorize operation and complete any returned user action. keep action urls in your trusted user interface, outside the agent’s context.
  4. when fill appears in available_operations, fill the checkout, submit once, and verify the merchant’s order record. a completed fill isn’t proof of payment.
the examples create and authorize a card for 23.06 usd. authorize takes no browser or page parameters when paying with the user’s own card.
for eligible cards, checkout receives a network token number, expiry, and one-time security code. the token represents the user’s existing card; it isn’t a newly issued disposable card. fill is restricted to the configured merchant’s top-level origin. the purchase’s state.payment_method_id names the card it’s bound to, and state.funding_status reports whether that card can still pay. see check the card funding a purchase. there’s no general standing approval or spending-limit setting across these paths. your application must verify purchase details before authorization. complete any returned user action and fill before the purchase’s expires_at.
fallback availability depends on the card and checkout. contact support before building on this path.where supported, the cardholder enters a fresh security code through a hosted action for each purchase. fill writes aliases that vgs replaces with the stored card details before sending the payment request to the processor. this path doesn’t issue a one-time network security code.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.

Reference