recommend_card
Ask the vault which of the user's own stored cards earns the most for a purchase (smart purchases). Pass the merchant name, its website when you know it, and the amount. Returns the card id to use as card_id at checkout, the reason in plain words, and the runners-up. null when smart purchases is off for this account, no stored card has been named yet (see name_card), or nothing could be said; then pay as you would have. Never a card number.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| currency | No | ISO currency code, default usd. Non-USD purchases account for foreign transaction fees. | |
| merchant | Yes | The merchant as the user would see it, e.g. "DoorDash". | |
| amount_cents | No | Order total in cents, when known. | |
| merchant_url | No | The merchant's website or checkout origin, e.g. https://www.doordash.com. Improves the category match. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why, in one or two sentences the user can be told verbatim. | |
| card_id | No | The vault card to pay with (pass as card_id at checkout), or null. | |
| message | Yes | Human-readable pick and reason. | |
| category | No | The spend category the merchant resolved to. | |
| alternatives | No | Other stored cards with their estimated value in cents and reason. |