payment_info
Access and review payment details using the specified payment ID. Notify users to approve pending payments at app.fewsats.com for payment status marked as 'needs_review'.
Instructions
Retrieve the details of a payment.
If payment status is needs_review inform the user he will have to approve it at app.fewsats.com
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pid | Yes |
Implementation Reference
- src/fewsats_mcp/server.py:52-56 (handler)The main handler function for the 'payment_info' tool. It is registered via the @mcp.tool() decorator and implements the tool logic by calling Fewsats().payment_info(pid) and handling the response.@mcp.tool() async def payment_info(pid: str) -> str: """Retrieve the details of a payment. If payment status is `needs_review` inform the user he will have to approve it at app.fewsats.com""" return handle_response(Fewsats().payment_info(pid))
- src/fewsats_mcp/server.py:9-11 (helper)Helper function used by the payment_info handler (and others) to process API responses into status code and JSON/text.def handle_response(response): try: return response.status_code, response.json() except: return response.status_code, response.text
- src/fewsats_mcp/server.py:52-52 (registration)The @mcp.tool() decorator registers the payment_info function as an MCP tool.@mcp.tool()