--- name: edpay-integration description: Integrate websites, apps, and backend services with the EDPay API. Use when adding or reviewing EDPay payments, invoices, payment links, API keys, or payment methods. compatibility: Works with Agent Skills compatible coding agents and outbound HTTPS access. EDPay MCP is optional. metadata: author: edutecka version: "1.0.0" --- # EDPay Integration Use this skill to implement EDPay integrations safely. Follow the user's language in explanations and generated project documentation. ## Start with the current contract 1. Inspect the target project's language, framework, existing payment flow, and secret-management approach before editing. 2. Read the current API contract at and the relevant guide at . 3. If EDPay MCP is available, use `edpay_list_operations` and `edpay_get_operation` to inspect the exact request, authentication, and response schemas. Use `edpay_list_integration_guides` for maintained SDK and plugin guidance. MCP is optional; the public OpenAPI contract and guides remain the source of truth. 4. Do not invent routes, fields, payment methods, or response shapes. Match the documented API and the account's supported currency and methods. ## Credentials and environments - Customers create an EDPay API key pair for server-to-server integrations under **Developers → API Keys**. They select an account and environment when creating the pair. - For server-to-server API use, the private key is shown only once; save the pair in the server's secret manager. For remote MCP, save the one-time composite credential in the MCP client's secure secret store. Never ask the user to paste either value into chat, prompts, tool arguments, code, URLs, browser storage, or logs. - Use the pair together in HTTPS server-to-server request headers: `X-EDPay-Public-Key` and `X-EDPay-Private-Key`. Never send the private key from browser or mobile client code. - For a remote MCP client, create a credential under **Dashboard → Developers → EDPay MCP** and store its one-time `X-EDPay-MCP-Key` value in the client's secure secret store. It packages the existing API key pair; the API continues to validate the same account, environment, expiry, and scopes. Revoking or expiring the pair also disables the MCP credential. - Use a matching Sandbox key pair or Production key pair. Reject mixed environment pairs. Let EDPay validate the actual key and its account environment; do not infer key validity from its format. - Read-only documentation and MCP discovery do not need customer keys. Invoice actions require a key with the `invoices:write` scope. - Never request or expose credentials other than the customer's EDPay key pair. Keep those keys in the customer's secure secret store and use them only with EDPay. ## Implement the requested flow - Keep payment requests server-to-server and use the existing API client or SDK where the project already has one. - Handle success and error response schemas from the current OpenAPI operation. Preserve request IDs and safe error codes for support, but never log request headers, private keys, or full sensitive payment payloads. - Use the account's supported currency and the payment methods exposed by EDPay. Do not assume conversion or change account settings as part of an integration task. - Keep payment method selection in the EDPay hosted checkout. Do not collect card data in the merchant app unless the documented EDPay integration explicitly supports that flow. - If the user asks to create an invoice or payment link and MCP write tools are available, first confirm the amount, currency, customer, and environment. Call the write tool only after the user explicitly requests the action. Use a stable idempotency key and reuse it for retries. - A draft invoice does not email or charge anyone. Creating a payment link finalizes the invoice and makes an active hosted link that can accept payment when shared; it does not itself charge the customer or send email. - Test the integration in Sandbox before Production. Do not submit a live payment, change gateway settings, or publish/deploy unless the user explicitly asks. ## Optional EDPay MCP For live API discovery and MCP connection instructions, see . The remote endpoint is and public setup instructions are at . Configure the one-time `X-EDPay-MCP-Key` value from the dashboard. Read tools work without it; write tools require the existing pair's `invoices:write` scope, validated by the API. MCP is optional; the EDPay Agent Skill and public API contract can be used without it. ## Finish Summarize the implementation, files changed, supported payment flow, and any setup the user must complete. Do not include credential values in the summary.