//
Install the portable EDPay integration guide in compatible coding agents. It works without MCP.
Install the published npm package for compatible agents in a project or across your user account.
npx --yes --package=@edutecka-mz/edpay-skills -- edpay-skills --agent '*'npx --yes --package=@edutecka-mz/edpay-skills -- edpay-skills --agent '*' --globalYou can also install directly from the official repository with the skills CLI.
npx skills add edutecka/edpay-agent-skills --skill edpay-integration --agent '*'The EDPay Agent Skill works on its own. For live operation discovery and MCP connection instructions, use the separate MCP guide.
Choose a language and copy the prompt into your agent's task.
Implement the requested EDPay checkout in this project. Work in the existing codebase, follow its patterns, and complete the change without asking me to consult documentation pages.
EDPay API: https://api-pay.edutecka.com
EDPay MCP: https://api-pay.edutecka.com/v1/mcp
OpenAPI contract: https://docs-pay.edutecka.com/openapi/v1.yaml
Before editing, identify the language, framework, order flow, and secret storage. Implement EDPay-hosted checkout. The flow below is sufficient to get started; MCP is optional for live discovery. Do not require me to consult documentation pages or invent fields, states, or response shapes.
Integration model:
1. Call GET /v1/public/payment-methods without credentials. Present only entries with enabled=true and availability=active. The method codes covered by this prompt are card, apple_pay, and google_pay; use the names, required fields, currencies, and availability returned by the API instead of hard-coding values.
2. Create a payment with POST /v1/payments and JSON fields amount_minor (positive integer), currency, and optional reference/description. currency must match the account's base currency and be supported by the active method. currency_conversion.base_currency describes the method's base/settlement currency; pricing.currency_code describes the fee currency. Respect the returned values and auto_convert_unsupported setting; never calculate or assume a conversion. The response contains data.id, data.reference, and data.status. Save the ID and reference with the order.
3. Create hosted checkout for that payment with POST /v1/payments/{id}/public-checkout. The JSON body accepts optional embed_origin; use it only as an exact HTTPS origin when the requested flow needs embedding, otherwise send an empty JSON object. The response contains data.id, data.token, and data.expires_at. Return the token to the browser through your app's backend endpoint. To present it, load https://pay.edutecka.com/v1/edpay.js, initialize the documented SDK with the publishable public key only if required, then call edpay.checkout({ token, mode: "redirect" }); modal and embedded are also documented modes, and embedded requires a DOM container. Never send the private key to the browser. Keep card data in EDPay-hosted checkout: do not collect, process, or store card numbers or security codes in the application.
4. Send a stable Idempotency-Key for each write and reuse it when retrying the same request. Confirm the status on the backend with GET /v1/payments/{id} or a verified webhook. Only succeeded confirms payment. pending, processing, and unknown are not confirmation; failed and cancelled are failure states. A browser redirect, SDK success callback, or HTTP 202 does not confirm payment.
Authentication and security:
- Partner requests use HTTPS and X-EDPay-Public-Key plus X-EDPay-Private-Key. Include a stable Idempotency-Key on each write and reuse it only when retrying the same operation.
- Keep API keys out of browser code and repositories. Server-to-server application integrations use X-EDPay-Public-Key and X-EDPay-Private-Key. For the remote MCP client, create a composite credential under Dashboard → Developers → EDPay MCP and store its X-EDPay-MCP-Key value in the client's secure secret store. MCP unpacks the original pair; the API keeps its existing validation. Read tools do not require credentials.
- Implement and validate in Sandbox. Do not make live charges, publish, or deploy to Production without an explicit request.
- Use a currency and methods supported by the EDPay account and application. Do not assume MZN, ZAR, or currency conversion.
- Use a stable idempotency key per business operation and reuse it when retrying the same request. Handle errors and states according to the contract.
- HTTP 202 means accepted/processing, not paid. Never mark an order paid because of a browser redirect or a pending response. Confirm a documented terminal success state server-side or verify a webhook.
- Use hosted checkout to collect payment details. Do not collect or store card data in the application.
Implement the requested flow across the necessary backend and frontend, update example configuration without secrets, and run relevant existing checks. If a business-critical value cannot be safely inferred, ask only for that value. Finish with a summary of changed files, required configuration, and checks performed.