Skip to main content
Glama

get_payment

Retrieve specific payment details using the payment ID to access transaction information, status, and related data from the GoCardless payment system.

Instructions

Get a specific payment by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
payment_idYesThe GoCardless payment ID (e.g., PM123)

Implementation Reference

  • Handler implementation for the 'get_payment' tool. Retrieves the payment by ID using the GoCardless client and returns formatted details including metadata and links.
    elif name == "get_payment": payment_id = arguments["payment_id"] payment = client.payments.get(payment_id) result = { "id": payment.id, "amount": payment.amount, "currency": payment.currency, "status": payment.status, "description": payment.description, "created_at": payment.created_at, "charge_date": payment.charge_date, "metadata": payment.metadata if hasattr(payment, 'metadata') else {}, "links": { "mandate": payment.links.mandate if hasattr(payment, 'links') and hasattr(payment.links, 'mandate') else None, "subscription": payment.links.subscription if hasattr(payment, 'links') and hasattr(payment.links, 'subscription') else None, }, } return [ types.TextContent(type="text", text=_format_json(result)) ]
  • Registration of the 'get_payment' tool in the list_tools() function, including its name, description, and input schema.
    types.Tool( name="get_payment", description="Get a specific payment by ID", inputSchema={ "type": "object", "properties": { "payment_id": { "type": "string", "description": "The GoCardless payment ID (e.g., PM123)", } }, "required": ["payment_id"], }, ),
  • Input schema definition for the 'get_payment' tool, specifying the required 'payment_id' parameter.
    inputSchema={ "type": "object", "properties": { "payment_id": { "type": "string", "description": "The GoCardless payment ID (e.g., PM123)", } }, "required": ["payment_id"], },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jmceleney/gocardless-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server