> ## Documentation Index
> Fetch the complete documentation index at: https://ownpay.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> OwnPay is licensed under AGPL-3.0 and is completely free - no licensing fees.
> Production docs URL: https://ownpay.org/docs - append .md to any page URL for clean markdown.
> OwnPay requires PHP 8.3+, MySQL/MariaDB, and Redis.
> MCP server available at https://ownpay.org/docs/mcp for programmatic documentation queries.
> Use root-relative links (e.g. /quickstart) for internal navigation - do NOT include /docs prefix.
> Plugin development: consult /developer/plugin-types/ pages for correct interfaces and manifests.

# Integration AI Prompt: Generate Webhook Integrations Fast

> Instruct your AI coding assistant to use the OwnPay Docs MCP server and skills file to discover and generate a third-party webhook integration.

This page provides a prompt template that instructs your AI assistant (such as Claude, Cursor, or Windsurf) to use the OwnPay Docs MCP server and skills file to dynamically retrieve the latest specifications and scaffold a third-party integration or webhook receiver.

Instead of copy-pasting API payloads, the prompt directs the AI to query the MCP server to find webhook signature verification steps, API endpoints, payload formats, and header standards itself.

## 1. Prerequisites

Ensure your AI assistant has access to the following resources:

* **MCP Server URL:** `https://ownpay.org/docs/mcp` (provides search and query tools)
* **Skills File URL:** `https://ownpay.org/docs/skill.md` (provides platform guidelines)

*See the [AI MCP Integration Guide](/developer/ai-mcp) and [AI Skills Installation](/developer/ai-skills) for setup instructions.*

***

## 2. System Instructions for the AI Agent

If your tool supports system instructions or custom rules (e.g. Cursor .cursorrules, Claude Projects, or custom GPT instructions), paste the following block:

```text theme={null}
You are an expert developer building a third-party system integration (webhook receiver and REST API caller) for the OwnPay platform.

You are equipped with the OwnPay Docs MCP server (https://ownpay.org/docs/mcp) and the OwnPay skills file (https://ownpay.org/docs/skill.md).

When asked to generate an integration or webhook handler:
1. Do not rely on assumptions or hardcoded templates.
2. Use your MCP tools to search the documentation for "Webhooks" and "REST API Integration" to retrieve the required endpoints, security headers, and webhook event payloads.
3. Retrieve and inspect the specifications for:
   - Webhook signature header name (e.g. `X-OwnPay-Signature`)
   - Webhook hashing algorithm (e.g. HMAC-SHA256) and payload construction
   - API endpoints structure and authentication headers (e.g. `Authorization: Bearer <key>`)
   - Response validation rules for transaction verification APIs
4. Generate the webhook handler and API client codebase strictly following the retrieved specifications.
```

***

## 3. Developer User Prompt

Paste the following prompt in your AI chat session to initiate the generation. Replace the bracketed values with your project language/framework:

```text theme={null}
I want to create a new webhook receiver and API client in [Language/Framework, e.g., Node.js / Express] to handle transaction completions from OwnPay.

Please perform the following steps:
1. Use the OwnPay Docs MCP server tools to search the documentation for "Webhooks" or "Webhook signature verification".
2. Read the retrieved guide to understand:
   - The header name containing the webhook payload signature
   - The step-by-step verification method using HMAC-SHA256 and the shared webhook secret
   - The payload fields (like transaction_id, status, amount, signature, and metadata)
3. Search for "REST API Integration" to find the standard endpoint format for retrieving transaction status.
4. Generate a secure, production-ready webhook endpoint and API client class based on the official guidelines you retrieved.
```

***

## 4. Expected Code Elements

By querying the MCP server, the AI agent will discover the correct guidelines and generate:

```text theme={null}
integration/
├── webhook-handler.js    # Decodes, verifies signature, and handles payment.transaction.completed
└── ownpay-client.js      # REST API client that interacts with the OwnPay endpoints
```


## Related topics

- [Node.js SDK - TypeScript-First Payment Integration](/docs/developer/integration/nodejs.md)
- [Developer Quickstart - Build Your First Payment Integration](/docs/developer/quickstart.md)
- [Addon Plugin AI Prompt - Generate Addon Extensions with AI](/docs/developer/plugin-types/addon-prompt.md)
- [Gateway Plugin AI Prompt: Generate Gateway Code with AI](/docs/developer/plugin-types/gateway-prompt.md)
- [Theme Plugin AI Prompt - Generate Checkout Themes with AI](/docs/developer/plugin-types/theme-prompt.md)
