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
4 changes: 2 additions & 2 deletions browsers/enable-payments-in-browser-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ remove-and-replace flow instead of adding a second wallet.

1. let the user select a provider that doesn't already have a wallet in the vault.
2. create the wallet item through your controller, following the [pay with card setup](/integrations/wallets/pay-with-card#connect-a-card), [link setup](/integrations/wallets/stripe-link), or [agentcard setup](/integrations/wallets/agentcard).
3. present the returned action using the authenticated flow below. the user connects or enrolls their real payment method with the provider. a KERNEL wallet is `connected` as soon as you create it and returns no action; invoke [`add_payment_method`](/integrations/wallets/pay-with-multiple-cards#add-a-card) and present the payment method's `card_enrollment` action instead.
3. present the returned action using the authenticated flow below. the user connects or enrolls their real payment method with the provider. a KERNEL wallet is `connected` as soon as you create it and returns no action; invoke [`add_payment_method`](/integrations/wallets/pay-with-card#connect-a-card) and present the payment method's `card_enrollment` action instead.
4. wait for the wallet's status to become `connected` before preparing a purchase. for a KERNEL wallet, wait until the card's payment method is `active` and eligible to pay.

### Present hosted actions in your application
Expand Down Expand Up @@ -225,7 +225,7 @@ a purchase using the user's own card is approved before checkout, so `authorize`
browser or page parameters. authorize once the agent reaches the final checkout
page: the one-time security code expires shortly after it's issued.

1. [create a `card` item](/integrations/wallets/pay-with-card#make-a-purchase) named `notebook-order` from the verified purchase. set `payment_method_id` to the `id` of an `active`, eligible card from the wallet's [`payment_methods` expansion](/integrations/wallets/pay-with-multiple-cards#list-payment-methods). set `merchant_url` to the top-level checkout page's url. `fill` writes only on that url's exact origin, so a checkout hosted on another domain needs that domain's url. visa cards also require `merchant_country`. `card` items with `provider: "kernel"` can't be updated; to change the purchase, delete the item and create a new one.
1. [create a `card` item](/integrations/wallets/pay-with-card#make-a-purchase) named `notebook-order` from the verified purchase. set `payment_method_id` to the `id` of an `active`, eligible card from the wallet's [`payment_methods` expansion](/integrations/wallets/pay-with-card#list-payment-methods). set `merchant_url` to the top-level checkout page's url. `fill` writes only on that url's exact origin, so a checkout hosted on another domain needs that domain's url. visa cards also require `merchant_country`. `card` items with `provider: "kernel"` can't be updated; to change the purchase, delete the item and create a new one.
2. require `authorize` in `available_operations` and invoke it, then present any returned `spend_approval` action through your controller. visa cards use it for the cardholder's approval, and [cards without network tokens](/integrations/wallets/pay-with-card#make-a-purchase) use it to collect a fresh security code. supported mastercard cards return no action.
3. wait for the card to become `ready`. a `wait` read holds for at most 60 seconds, so keep retrieving while it's `pending_authorization`; the cardholder has up to 30 minutes to use the approval link.

Expand Down
3 changes: 1 addition & 2 deletions browsers/payments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ your application must independently verify the merchant, items, amount, and curr
## Get started

- [choose a wallet integration](/integrations/wallets/overview) for payment-method connection, approval, and reuse options.
- [pay with card](/integrations/wallets/pay-with-card) to collect a user's card directly, with hosted or embedded enrollment.
- [pay with multiple cards](/integrations/wallets/pay-with-multiple-cards) to hold several cards in one KERNEL wallet and choose which card pays.
- [pay with card](/integrations/wallets/pay-with-card) to collect a user's cards directly, with hosted or embedded enrollment, and choose which card pays.
- [fill single-use cards](/integrations/wallets/single-use-cards) to fill a card your backend or card issuer already has, such as a single-use virtual card.
- [enable payments in a browser agent](/browsers/enable-payments-in-browser-agent) for the controller, agent, and checkout walkthrough.
- [fill browser fields](/vaults/fill) for KERNEL's injection api, field selection, and outcome contract.
Expand Down
7 changes: 4 additions & 3 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@
{ "source": "/integrations/payments/overview.md", "destination": "/integrations/wallets/overview.md" },
{ "source": "/integrations/wallets/kernel", "destination": "/integrations/wallets/pay-with-card" },
{ "source": "/integrations/wallets/kernel.md", "destination": "/integrations/wallets/pay-with-card.md" },
{ "source": "/integrations/wallets/kernel-payment-methods", "destination": "/integrations/wallets/pay-with-multiple-cards" },
{ "source": "/integrations/wallets/kernel-payment-methods.md", "destination": "/integrations/wallets/pay-with-multiple-cards.md" },
{ "source": "/integrations/wallets/kernel-payment-methods", "destination": "/integrations/wallets/pay-with-card" },
{ "source": "/integrations/wallets/pay-with-multiple-cards", "destination": "/integrations/wallets/pay-with-card" },
{ "source": "/integrations/wallets/kernel-payment-methods.md", "destination": "/integrations/wallets/pay-with-card.md" },
{ "source": "/integrations/wallets/pay-with-multiple-cards.md", "destination": "/integrations/wallets/pay-with-card.md" },
{ "source": "/integrations/payments/stripe-link", "destination": "/integrations/wallets/stripe-link" },
{ "source": "/integrations/payments/stripe-link.md", "destination": "/integrations/wallets/stripe-link.md" },
{ "source": "/integrations/payments/agentcard", "destination": "/integrations/wallets/agentcard" },
Expand Down Expand Up @@ -219,7 +221,6 @@
"browsers/payments",
"integrations/wallets/overview",
"integrations/wallets/pay-with-card",
"integrations/wallets/pay-with-multiple-cards",
"integrations/wallets/push-cards",
"integrations/wallets/single-use-cards",
"integrations/wallets/stripe-link",
Expand Down
4 changes: 2 additions & 2 deletions integrations/wallets/embedded-card-capture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ the package requires react 18 or later and ships no styles. use 0.5.0 or later:

read `capture_token` from a `card_enrollment` action in your authenticated backend. the token is a secret capability for one card enrollment, not an api key.

a new KERNEL wallet is `connected` with no card and no action. invoke [`add_payment_method`](/integrations/wallets/pay-with-multiple-cards#add-a-card) for each card, then read `payment_method.action.capture_token` from the result.
a new KERNEL wallet is `connected` with no card and no action. invoke [`add_payment_method`](/integrations/wallets/pay-with-card#connect-a-card) for each card, then read `payment_method.action.capture_token` from the result.

<CodeGroup>

Expand Down Expand Up @@ -88,7 +88,7 @@ if added.type == "add_payment_method" and added.payment_method.action is not Non

the new payment method starts in `pending_enrollment`. after the cardholder adds a card, it becomes `active`.

a wallet created before cards were payment methods might still have a default card, `card`, waiting for enrollment. its `card_enrollment` action, with its `capture_token`, is on that method in the wallet's [`payment_methods` expansion](/integrations/wallets/pay-with-multiple-cards#list-payment-methods), not on the wallet.
a wallet created before cards were payment methods might still have a default card, `card`, waiting for enrollment. its `card_enrollment` action, with its `capture_token`, is on that method in the wallet's [`payment_methods` expansion](/integrations/wallets/pay-with-card#list-payment-methods), not on the wallet.

## Render the component

Expand Down
4 changes: 2 additions & 2 deletions integrations/wallets/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ see [how payments work on KERNEL](/browsers/payments#how-payments-work) for the

| payment source | use it to | environment |
| --- | --- | --- |
| [pay with card](/integrations/wallets/pay-with-card) | collect a user's cards directly through hosted or embedded enrollment, then [choose which card pays](/integrations/wallets/pay-with-multiple-cards) | live only |
| [pay with card](/integrations/wallets/pay-with-card) | collect a user's cards directly through hosted or embedded enrollment, then [choose which card pays](/integrations/wallets/pay-with-card#choose-a-card-for-a-purchase) | live only |
| [single-use cards](/integrations/wallets/single-use-cards) | fill a card your backend or card issuer already has, such as a single-use virtual card, without passing its details to the agent | set by the card you supply |
| [link by stripe](/integrations/wallets/stripe-link) | use payment methods from the user's link wallet; requires a us phone number | live only |
| [shop pay](/integrations/wallets/shop-pay) | use cards saved to the user's shop account, approved in shop for each purchase; usd only | live only |
Expand Down Expand Up @@ -80,7 +80,7 @@ supports the same operations. KERNEL payment requests must set
`payment_method_id`. agentcard, shop pay, and vgs purchases and KERNEL single-use cards stay `card` items. updates to a
`payment_request` item must set `type: "payment_request"`.

for behavior specific to each payment source, see [pay with card](/integrations/wallets/pay-with-card), [pay with multiple cards](/integrations/wallets/pay-with-multiple-cards), [single-use cards](/integrations/wallets/single-use-cards), [link](/integrations/wallets/stripe-link#item-reference), [shop pay](/integrations/wallets/shop-pay#item-reference), [agentcard](/integrations/wallets/agentcard#item-reference), or [bring your own vgs vault](/integrations/wallets/bring-your-own-vgs-vault#make-a-purchase).
for behavior specific to each payment source, see [pay with card](/integrations/wallets/pay-with-card), [single-use cards](/integrations/wallets/single-use-cards), [link](/integrations/wallets/stripe-link#item-reference), [shop pay](/integrations/wallets/shop-pay#item-reference), [agentcard](/integrations/wallets/agentcard#item-reference), or [bring your own vgs vault](/integrations/wallets/bring-your-own-vgs-vault#make-a-purchase).

## Payment actions and recovery

Expand Down
Loading
Loading