Skip to main content
Glama
lakshitha0526

PayHere MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PAYHERE_MODEYessandbox or live
PAYHERE_APP_IDYesFrom Settings → Business Apps
PAYHERE_APP_SECRETYesApp secret paired with PAYHERE_APP_ID
PAYHERE_MERCHANT_IDYesFrom PayHere dashboard → Settings → Integrations
PAYHERE_MERCHANT_SECRETYesDomain-specific secret

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
create_checkout_payloadA

Generates the form data needed to POST a checkout request to PayHere, including the MD5 hash. Returns action URL, form fields, and an HTML snippet.

get_paymentA

Returns all payment attempts (success, refunded, chargedback) associated with the given order_id. PayHere does not support listing by date range or status — only by order_id.

issue_refundA

Refunds a payment by payment_id. Omit amount for a full refund, or set it for a partial refund. Returns the PayHere refund status.

generate_signatureA

Computes a PayHere MD5 hash for either checkout submission (mode='checkout') or notify URL validation (mode='notify'). For notify mode, pass expectedMd5Sig to verify an incoming signature in one shot. Uses the merchant secret from the server's environment — never include the secret in tool arguments.

verify_credentialsA

Health check that confirms env vars are loaded and (once implemented) that the App credentials can fetch an OAuth token. Useful first call when setting up an integration.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/lakshitha0526/payhere-mcp'

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