Skip to main content
when your backend or a card issuer already has a card for a purchase, such as a single-use virtual card, you can store it in a KERNEL wallet and let KERNEL type it into the merchant’s checkout. your backend sends the card details to KERNEL once. KERNEL never returns them, so the agent driving the browser doesn’t handle them. a single-use card doesn’t use the wallet’s cards or their network tokens. there’s no enrollment, cardholder approval, or authorize step: the card is ready as soon as you create it, and fill is its only operation. it’s unrelated to capabilities.single_use_card on the wallet’s payment methods, which reports whether an enrolled card can pay.
you’re responsible for the cards you store. only store cards that are allowed outside PCI DSS scope, such as single-use virtual cards whose issuer confirms that.

Before you start

  • create a vault and a KERNEL wallet in it. the wallet must be connected, but it doesn’t need any cards of its own.
  • get the card details from your card issuer in your backend, not in the agent’s context.
  • a scoped api key needs vaults:write to create and delete the card, and vaults:use and browsers:use to fill it.
the examples on this page continue from one another and together form a complete flow: create the card, attach its vault to a browser, fill the checkout, then delete the card.

Create a single-use card

create a card item under the wallet with spec.single_use_card set to the card’s details: KERNEL records amount, currency, and merchant_name but doesn’t enforce them. any spending limit is up to the card’s issuer. an invalid request returns 400, and error messages never include the values you sent. single_use_card can’t be combined with payment_method_id, and only card items accept it, not payment_request items. if the wallet isn’t connected, creation returns 409.
the response describes the card without its details:
  • state.source is single_use_card, which tells it apart from a purchase funded by one of the wallet’s cards. a single-use card has no payment_method_id or funding_status.
  • state.masks holds the card’s brand and last4. state.domains holds the registrable domain of merchant_url.
  • spec.single_use_card returns only reference. the card details are write-only: KERNEL stores them encrypted and never returns or logs them.

Fill the checkout

attach the vault when you create the browser, then invoke fill with the browser’s browser_id, the exact current top-level page_url, and field bindings. single-use cards support these fields: request only the fields the checkout shows. requesting a billing field you didn’t supply returns field_unavailable before anything is written. fill works on any https page whose registrable domain matches merchant_url’s, including its subdomains. a card created with https://www.example.com/checkout fills on https://checkout.example.com/pay. stores on a shared hosting platform stay separate: a card for a.myshopify.com can’t fill b.myshopify.com. a page on any other domain returns 403 with destination_denied, and KERNEL refuses http pages.
fill doesn’t consume the card, so you can fill it again until it expires, for example after the page reloads. fill never submits the form. for selectors, payment frames, and outcomes, see fill browser fields.
fill writes the real card details into the page. an agent with unrestricted browser or cdp access can read them there. invoke fill and submit the checkout from your trusted controller, not from a tool the agent can call at will.

Delete the card after checkout

delete the card as soon as the checkout is submitted. deleting the card, its wallet, or its vault deletes the stored card details immediately.

Expiry and deletion

expires_at defaults to 2 hours after creation. a value you set must be in the future and at most 24 hours after creation. neither can be later than the end of the card’s expiry month. from expires_at, reads report the card’s status as expired, and fill returns 409 without writing anything. KERNEL deletes the stored card details shortly after expires_at. to remove them sooner, delete the card.

Retries and updates

creating a card is idempotent per key: compute expires_at once and reuse the same request when you retry. use a new key for each card. single-use cards can’t be updated; PATCH returns 409. to change anything, delete the card and create a new one under a new key. authorize and confirm_transaction aren’t available for single-use cards.

Reference