doordash_payment_methods
Retrieve saved payment methods for DoorDash orders to manage billing information and complete transactions.
Instructions
List saved payment methods
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:709-726 (handler)The tool 'doordash_payment_methods' is registered and implemented directly in src/tools/index.ts as a handler that calls api.account.getPaymentMethods().
server.registerTool( "doordash_payment_methods", { description: "List saved payment methods" }, () => wrap(async () => { const methods = await api.account.getPaymentMethods(); if (methods.length === 0) return err("No payment methods found."); const lines = ["# Payment Methods\n"]; for (const m of methods) { const def = m.isDefault ? " **(default)**" : ""; lines.push( `- ${m.brand} ****${m.last4} exp ${m.expMonth}/${m.expYear}${def} (ID: ${m.id})`, ); } return ok(lines.join("\n")); }), );