Record a purchase
record_purchaseRecords a purchase the user has already made, so spending caps, welcome-bonus progress, yearly spend bonuses and statement credits used stay accurate for future recommendations. It updates the user's saved wallet. Only call it after the purchase has happened, and only once per purchase: calling it twice counts the spend twice. Purchases with no cap, no open welcome bonus, no spend bonus and no enrolled statement credit are acknowledged and nothing is written. For a merchant earnrate doesn't recognize it asks for category first, so caps aren't missed. It uses the user's hosted earnrate wallet, not a wallet file on their computer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"cardId": "<cardId>",
"merchant": "<merchant>",
"amount": "<amount>"
},
"name": "record_purchase"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Purchase date, YYYY-MM-DD. Defaults to today. | |
| amount | Yes | Amount spent in US dollars. | |
| cardId | Yes | The card used, as a cardId from list_wallet or best_card_for_purchase. | |
| channel | No | How the purchase is made. Omit if unknown; the answer says what it assumed. | |
| category | No | For a merchant earnrate doesn't know, its spending category, e.g. dining for a restaurant: without one the purchase isn't recorded, since its caps can't be told. If nobody knows, other records it toward a welcome bonus without touching any cap. Ignored when earnrate knows the merchant. Categories: dining (Restaurants), dining.fast_food (Fast food), grocery.supermarket (Supermarkets), grocery.online (Online grocery and delivery), superstore (Superstores), warehouse_club (Warehouse clubs), convenience_store (Convenience stores), gas (Gas stations), gas.grocery_store (Gas at grocery stores), gas.superstore (Gas at superstores and warehouse clubs), ev_charging (EV charging), transit (Transit), transit.rideshare (Rideshare and taxis), travel (Travel), travel.flights (Flights), travel.hotels (Hotels), travel.car_rental (Car rentals), travel.cruise (Cruises), streaming (Streaming services), tv_internet (TV and internet service), phone (Cell phone service), utilities (Home utilities), housing (Rent and mortgage), drugstore (Drugstores and pharmacies), movie_theaters (Movie theaters), entertainment (Live entertainment and events), fitness (Gyms and fitness), department_store (Department stores), clothing (Clothing stores), electronics (Electronics stores), sporting_goods (Sporting goods stores), home_improvement (Home improvement), furniture (Furniture stores), online_retail (Online retail), office_supply (Office supply stores), shipping (Shipping and couriers), online_advertising (Social media and search advertising), other (Everything else). | |
| merchant | Yes | Merchant name or web address as the user would say it or see it, e.g. "Whole Foods" or "delta.com", or a kind of place, e.g. "restaurants" or "gas station". |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bonus | Yes | ||
| credit | Yes | ||
| booking | Yes | ||
| message | Yes | ||
| recorded | Yes | ||
| milestones | Yes |