collect-card
Collect payment card information to complete purchases on Terminal.shop, enabling secure transactions for orders and subscriptions.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:930-955 (handler)The complete inline handler and registration for the 'collect-card' tool. It has no input parameters (empty schema {}). The function calls the terminalApi to POST /card/collect, retrieves a secure URL for card entry, and returns it to the user in a formatted message. Includes error handling.server.tool("collect-card", {}, async () => { try { const response = await terminalApi.post("/card/collect"); const data = response.data.data; return { content: [ { type: "text", text: `Please use this URL to securely enter your card details: ${data.url}\nAfter completing the form, your card will be added to your account.`, }, ], }; } catch (error) { console.error("Error generating card collection URL:", error); return { content: [ { type: "text", text: `Error generating card collection URL: ${error.message}`, }, ], isError: true, }; } });