Account
user.payment_method.setup
Check whether a card is on file, and get the link to add or replace one.
The first tool a buyer's assistant calls. Card numbers are never typed into the chat.
| Type | Write: changes a cart or an order |
| Needs a cart the buyer approved | No |
| Moves money | No |
Tool description (what the assistant sees)
Starts saving a card for the buyer. Returns a Stripe setup client secret for the buyer's own payment page, plus the cards already on file; card numbers are never accepted as tool input. With replace: true it returns a link that saves a new card and removes the old one once the new one is saved. Safe to call repeatedly.#Parameters
| Name | Type | Required | Description |
|---|---|---|---|
replace | boolean | No | true returns a link that saves a new card and removes the old one once the new one is saved. |
include_setup_client_secret | boolean | No | Only for a surface that can draw Stripe's card form itself. Chat clients use card_setup_url instead. |
#Notes
checkout_readysays whether the buyer can order now.ACCOUNT_SETUP_REQUIREDmeans the phone, terms or card step is not finished. Give the buyer the link fromcorrective_actionexactly as returned and stop.