Payhere
Easy payment links for accepting online payments
Verdict
Common use cases
- Check payment status during customer calls
- Pull 30-day revenue stats for finance reviews
- List new customers added this month
- Create subscription plans from Slack threads
- Monitor webhook events for failed payments
Integration
- Vendor
- Payhere
- Category
- other
- Auth
- API_KEY
- Tools
- 13
- Composio slug
payhere
Tools
- Create Hook
Tool to subscribe to a REST hook for receiving webhook events. Use when you need to register a webhook endpoint to receive real-time notifications for payment_received, subscription_cancelled, or subscription_created events.
- Create Plan
Tool to create a new payment plan in PayHere. Use when you need to set up either a recurring subscription or one-off payment plan for accepting payments.
- Delete Hookdestructive
Tool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.
- Get Current Company
Tool to fetch company information for the currently authenticated user. Use when you need to retrieve comprehensive company details including identity, configuration, integration status, and associated users.
- Get Current Company Stats
Tool to fetch payment statistics for the last 30 days with comparison data from the preceding 30-day period (30-60 days ago). Use when you need to analyze recent payment trends, subscriber growth, or compare current performance against the
- Get User
Tool to fetch information on the currently authenticated user. Use when you need to retrieve details about the logged-in user.
- List Customers
Tool to list all customers from Payhere, ordered chronologically with most recent first. Use when you need to retrieve customer records, browse customers, or access customer information. Supports pagination via page and per_page parameters.
- List Payments
Tool to list all payments ordered chronologically, most recent first. Use when you need to retrieve payment history or check payment statuses. Supports pagination with page and per_page parameters.
- List Plans
Tool to list all plans in your PayHere account. Use when you need to retrieve and paginate through available plans.
- List REST Hooks
Tool to list all active REST hooks subscriptions for the authenticated company. Use when you need to view all currently registered webhook listeners for your PayHere account.
- List subscriptions
Tool to list all subscriptions ordered chronologically by most recent payment first. Use when you need to retrieve subscription data with customer and plan details.
- Update Current Company
Tool to update the company information for the currently authenticated user. Use when modifying company details such as name, legal name, address, logo, support email, website, or branding preferences (button color and text color).
- Update Plan
Tool to update an existing plan's configuration and settings. Use when you need to modify plan properties like name, description, pricing, or other settings for both one-off and subscription plans.
Setup
Setup guide
- 11. Log into your Payhere account and navigate to Settings → API Keys to generate a new key with full read/write permissions. 2. In Switchy, open your workspace settings and click Integrations, then find Payhere in the list. 3. Paste your API key into the authentication field and click Connect. 4. Switchy will verify the key by fetching your company details — if successful, you'll see a green checkmark. 5. Open any Space and type '@Payhere list recent payments' to confirm the connection works. 6. To invoke a tool, @mention Payhere followed by your request in plain language — for example, '@Payhere show me customers added this week' or '@Payhere create a monthly subscription plan for $49'. The AI will map your intent to the appropriate Payhere tool and return structured results inline.
What teammates see: by default, memories from Payhere are scoped to the Space (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Spaces have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Recent Payment Summary
@Payhere list the 10 most recent payments and show me the amount, status, and customer name for each.Open in a Space →
30-Day Revenue Trend
@Payhere get our company stats for the last 30 days and compare them to the previous 30 days.Open in a Space →
New Customer Onboarding
@Payhere show me all customers created in the last 7 days, ordered by most recent first.Open in a Space →
Create Subscription Plan
@Payhere create a monthly subscription plan called 'Pro Tier' for $79 NZD with a 7-day trial.Open in a Space →
Webhook Setup Check
@Payhere list all active webhook subscriptions and tell me which events each one is listening for.Open in a Space →
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@Payhere show me all payments from the last 7 days and summarize which plans are generating the most revenue
Based on the recent payment data, your top-performing plans are: 'Pro Monthly' ($4,250 from 85 payments), 'Enterprise Annual' ($3,600 from 3 payments), and 'Starter Monthly' ($890 from 89 payments). The Pro Monthly plan shows the highest transaction volume, while Enterprise Annual has the best average transaction value at $1,200. Total revenue across all plans in the last 7 days: $9,340 from 189 successful payments.
This example combines the List Payments tool with AI synthesis to surface revenue insights. The MCP returns raw payment records; the AI aggregates them by plan. Requires read access to payment data. Note that PayHere's API returns payments in reverse chronological order, so filtering by date range happens client-side.
@Payhere create a new subscription plan called 'Team Plan' for $49/month with a 14-day trial
Successfully created the 'Team Plan' subscription in your PayHere account. Plan details: $49.00 charged monthly, 14-day free trial period, recurring billing enabled. The plan is now live and ready to accept subscribers. You can share the payment link or embed the checkout form on your site. Plan ID: plan_8x3k9m2p (save this for future reference or webhook filtering).
This example uses the Create Plan tool to set up a new recurring payment plan. The MCP handles the API call and returns confirmation with the plan ID. Requires write access to your PayHere account. Once created, the plan is immediately active—test thoroughly before sharing payment links with customers.
@Payhere register a webhook at https://myapp.com/webhooks/payhere to notify me when subscriptions are cancelled
Webhook registered successfully. PayHere will now send POST requests to https://myapp.com/webhooks/payhere whenever a subscription_cancelled event occurs. Hook ID: hook_7j2n4k8q. Your endpoint should respond with a 200 status code within 10 seconds to acknowledge receipt. Failed deliveries will be retried up to 3 times with exponential backoff.
This example demonstrates the Create Hook tool for real-time event notifications. The MCP registers the webhook URL with PayHere's API. Your endpoint must be publicly accessible and return 200 OK responses. Be aware that webhook payloads may contain sensitive customer data—validate signatures and use HTTPS. You can register multiple hooks for different event types.
Use-case deep-dives
When Payhere MCP beats spreadsheet exports for monthly close
A 6-person SaaS startup closes books on the 5th of each month. Their accountant needs to reconcile subscription revenue, refunds, and churn against Stripe or bank deposits. The Payhere MCP's List Payments and Get Current Company Stats tools pull the last 30 days of transactions and subscriber movement in one call, filtered by status or date range. This beats downloading CSVs because the data arrives structured and current—no manual date-range fiddling or stale snapshots. The trade-off: if your payment volume exceeds 500 transactions per month, pagination becomes a chore and you're better off using Payhere's bulk export API directly. For teams under that threshold, the MCP turns reconciliation from a 90-minute CSV hunt into a 10-minute Switchy query.
Pull payment history mid-ticket without leaving Switchy
A 3-person support team fields 20-30 tickets daily about failed payments, subscription status, or billing disputes. The Payhere MCP's List Customers and List Payments tools let agents pull a customer's full payment timeline and current plan status without alt-tabbing to the Payhere dashboard. This works when your support volume is low enough that agents can afford a 2-3 second API call per lookup—roughly under 100 tickets per day. Above that, response-time pressure means you need a cached customer view or a dedicated support panel. For small teams where context-switching kills flow more than API latency does, the MCP keeps agents in one workspace and cuts average handle time by 30-45 seconds per ticket.
When real-time payment alerts justify the MCP's webhook tools
A 4-person operations team runs a marketplace where seller payouts depend on buyer payments clearing within 24 hours. They use the Payhere MCP's Create Hook and Delete Hook tools to subscribe to payment_received and subscription_cancelled events, piping alerts into a Switchy channel that triggers payout workflows. This setup makes sense when you need sub-minute latency and your event volume stays under 500 per day—enough to justify the MCP's overhead but not so much that you need a dedicated event bus. If your payment events exceed 1,000 daily or you're already running Kafka or EventBridge, the MCP adds complexity without speed gains. For small teams where Zapier feels too rigid and custom webhooks feel too heavy, the MCP hits the sweet spot.
Frequently asked
What does the Payhere MCP let me do in Switchy?
It connects your Payhere payment data to Switchy's AI workspace. You can query payment history, list customers, create subscription plans, and pull 30-day revenue stats without leaving the chat. The MCP also lets you register webhooks to receive real-time notifications when payments land or subscriptions cancel, so your team can act on payment events immediately.
Do I need admin access to connect Payhere?
You need a Payhere API key, which typically requires account-owner or admin permissions to generate. The key authenticates as a specific user, so whoever connects it in Switchy will grant the workspace access to that user's company data. Check your Payhere account settings to confirm you can create API keys before attempting setup.
Can the Payhere MCP refund payments or update customer details?
No. The MCP is read-heavy: it lists payments, customers, and stats, and it can create new plans or webhook subscriptions. It does not expose refund, dispute, or customer-update tools. For those actions, you still need to log into Payhere's dashboard or use their full REST API directly.
Why use this instead of just logging into Payhere?
Speed and context. In Switchy, you can ask "show me last week's failed payments" or "which customers subscribed in March" and get answers in seconds, without navigating Payhere's UI. The MCP also surfaces payment data alongside your team's other tools—GitHub issues, Slack threads, Notion docs—so you can correlate revenue events with product work in one workspace.
Who on the team should connect the Payhere integration?
Whoever owns billing or finance operations. That person generates the API key and connects it in Switchy; everyone else on the workspace can then query payment data through the AI, subject to your team's access controls. If multiple people need direct Payhere admin access, they should still share one MCP connection to avoid key sprawl.