Средний8 мин чтения
PonponPay SDK Integration Skill
A PonponPay integration Skill for Codex, Cursor, and other AI coding tools. Users provide the project and required API Key or Public Key, and the AI integrates the official SDK safely.
What This Skill Does
- Detects whether the project is PHP, Laravel, WordPress, Next.js, React, or a plain frontend app.
- Uses PHP SDK and API Key Mode for server-side payment flows.
- Uses JavaScript SDK and Public Key Mode for browser checkout to avoid API Key exposure.
- Generates order creation, checkout redirect, webhook verification, and env examples.
- Keeps changes minimal and runs available validation commands.
Published Files
- SKILL.md
- references/integration-modes.md
- references/php-sdk.md
- references/js-sdk.md
- references/webhook.md
Install in Codex
Save the directory below into your Codex skills folder, or download these static files into your team Skill repository.
mkdir -p ~/.codex/skills/ponponpay-sdk-integration
curl -o ~/.codex/skills/ponponpay-sdk-integration/SKILL.md \
https://ponponpay.com/skills/ponponpay-sdk-integration/SKILL.md
mkdir -p ~/.codex/skills/ponponpay-sdk-integration/references
curl -o ~/.codex/skills/ponponpay-sdk-integration/references/integration-modes.md \
https://ponponpay.com/skills/ponponpay-sdk-integration/references/integration-modes.md
curl -o ~/.codex/skills/ponponpay-sdk-integration/references/php-sdk.md \
https://ponponpay.com/skills/ponponpay-sdk-integration/references/php-sdk.md
curl -o ~/.codex/skills/ponponpay-sdk-integration/references/js-sdk.md \
https://ponponpay.com/skills/ponponpay-sdk-integration/references/js-sdk.md
curl -o ~/.codex/skills/ponponpay-sdk-integration/references/webhook.md \
https://ponponpay.com/skills/ponponpay-sdk-integration/references/webhook.mdSKILL.md
---
name: ponponpay-sdk-integration
description: Use when a user wants to integrate PonponPay payments into an existing application with the official SDKs. Covers PHP API Key Mode for server-side order creation and webhooks, JavaScript Public Key Mode for browser checkout, framework detection, environment setup, safe secret handling, and validation.
---
# PonponPay SDK Integration
Use this skill when the user asks to add PonponPay payments, checkout, crypto payment acceptance, USDT/USDC payments, webhook handling, or SDK setup to an existing codebase.
## Core Rules
- Never put an API Key in browser code, committed source files, screenshots, logs, or examples.
- Use Public Key Mode for browser/frontend order creation with the JavaScript SDK.
- Use API Key Mode for server-side order creation, order queries, payment methods, merchant details, and webhook verification.
- Prefer official SDKs over hand-written API calls.
- Add .env.example entries, but never write real secrets into .env unless the user explicitly provides local-only values.
- Use the merchant backend webhook as the source of truth for marking business orders paid.Recommended Flow
- Enable the Skill inside the target project.
- Provide the PonponPay API Key or Public Key and the desired checkout/order flow.
- The AI installs `ponponpay/php-sdk` or `@ponponpay/sdk` based on the project.
- The AI adds `.env.example`, order creation, checkout redirect, and webhook handling.
- The AI runs typecheck/build/test and reports the manual test path.
Example Prompts
在我的 Laravel 项目里接入 PonponPay,用 PHP SDK 创建订单并添加 webhook 验签。
在这个 Next.js 项目里接入 PonponPay 前端支付,使用 Public Key Mode 和 @ponponpay/sdk。
给这个 WordPress 插件增加 PonponPay 支付入口,API Key 从后台配置读取,不要写死。Security Boundaries
- API Keys are server-side only and must never enter browser code.
- Public Keys can be used in frontend code, but require a domain whitelist.
- Webhook verification is the source of truth for paid status.
- The Skill writes `.env.example` and does not commit real secrets.
Public Key · API Key · PHP SDK