Payhere connects to a Nagent workspace with an API key. Once it is connected, agents can call 13 Payhere actions, such as "Create Hook", "Create Plan" and "Get Current Company". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against Payhere, with input parameters and output schema.
PAYHERE_CREATE_HOOKTool 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.
Input parameters
Your platform's endpoint URL that will receive POST requests when events trigger.
Event type to monitor. Must be one of: 'payment_received', 'subscription_cancelled', or 'subscription_created'.
Friendly name of your platform. Helps with metrics and debugging.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_CREATE_PLANTool 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.
Input parameters
Display name for the plan shown to customers.
Plan pricing. Omit for donation plans where user_selects_amount is true.
Hide plan from landing page if true.
Three-letter currency code (e.g., 'usd', 'gbp', 'eur').
Enable quantity selection field. Only applies to one-off plans.
Initial one-time charge amount for recurring plans.
Day of month for monthly charges (1-31) for recurring plans.
Product or service description shown to customers.
URL to redirect customers after successful payment.
Endpoint URL for receiving payment status notifications.
Auto-cancel subscription after N payments for recurring plans.
Type of plan: "recurring" for subscriptions or "one_off" for one-time payments.
Custom message displayed on payment receipts.
Custom label for payment button. Defaults to "Pay".
Billing frequency for recurring plans: "week", "month", or "year". Required for recurring plans.
Minimum billing cycles before cancellation is allowed for recurring plans.
Enable donation functionality where users choose the payment amount. When true, omit the price field.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_DELETE_HOOKTool to remove a REST hook listener subscription. Use when you need to stop receiving webhook events for a specific hook.
Input parameters
The unique identifier of the REST hook to delete
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_GET_CURRENT_COMPANYTool 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.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_GET_CURRENT_COMPANY_STATSTool 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 previous month.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_GET_USERTool to fetch information on the currently authenticated user. Use when you need to retrieve details about the logged-in user.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_LIST_CUSTOMERSTool 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.
Input parameters
Page number for pagination. Use to navigate through paginated results.
Records per page. Default is 20, maximum is 100.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_LIST_HOOKSTool 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.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_LIST_PAYMENTSTool 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.
Input parameters
Page number for pagination.
Number of records per page (default: 20, maximum: 100).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_LIST_PLANSTool to list all plans in your PayHere account. Use when you need to retrieve and paginate through available plans.
Input parameters
Page number for pagination. Must be >= 1.
Number of plans per page. Default is 20, maximum is 100.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_LIST_SUBSCRIPTIONSTool to list all subscriptions ordered chronologically by most recent payment first. Use when you need to retrieve subscription data with customer and plan details.
Input parameters
Page number for pagination. Defaults to 1 if not specified.
Number of records returned per page. Defaults to 20 if not specified. Maximum value is 100.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_UPDATE_CURRENT_COMPANYTool 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).
Input parameters
Logo image for the company.
Display name of the company
Company address for receipt display
Company website shown in receipts
Legal name shown on receipts
Text color: empty (auto), 'white', or 'black'
Hex color for pay button (e.g., #ff6600)
Support email displayed in receipts
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
PAYHERE_UPDATE_PLANTool 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.
Input parameters
The unique identifier of the plan to update
Display name for the plan
Plan cost (for one-off plans only)
Exclude plan from payment landing page
ISO 4217 currency code (for one-off plans only)
Enable quantity field on payment form (for one-off plans only)
Initial one-time charge (for subscription plans only)
Monthly charge date (for subscription plans only)
Product/service description shown to customers
Post-payment redirect destination
Endpoint for payment status notifications
Auto-cancel after N payments (for subscription plans only)
Custom message added to email receipts
Button label (e.g., 'Subscribe', 'Donate')
Minimum payments before cancellation (for subscription plans only)
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 13 Payhere actions on Nagent, including "Create Hook", "Create Plan" and "Get Current Company". Create Hook: Subscribe to a REST hook for receiving webhook events. Each action is listed on this page with its input parameters and its output.
Payhere connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
Create Hook takes 3 required inputs: post_url, resource and integration. It returns data, error and successful.