polypay-sdk-integration-skill
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "polypay-sdk-integration-skill" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-099420dea90dfc672ad5ed1f312fb34153090596cd6e5a12153f68f836020bfa. Verify the upstream source and version against https://skillhub.cn/skills/user_fcd2b798/polypay-sdk-integration-skill before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Integrate PolyPay payments and merchant automation into production apps: use when adding or fixing PolyPay hosted checkout, browser JavaScript checkout, PHP SDK, server REST API integrations, webhook verification, sandbox testing, x402 proxy payments, notification center channels or templates, PolyPay MCP access, or payment flows for WordPress, WooCommerce, WHMCS, and Shopify. Also applicable to classic PonponPay integration requests.
Introduction source: third_party · user_fcd2b798 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Integrate PolyPay payment acceptance and merchant automation into production applications. Use when Codex needs to add or repair PolyPay hosted checkout, JavaScript browser checkout, PHP SDK or server REST API integration, webhook verification, sandbox testing, x402 agent payments, Notification Center channels or templates, PolyPay MCP access, or WordPress, WooCommerce, WHMCS, and Shopify payment flows. Also trigger for legacy PonponPay integration requests.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: polypay-sdk-integration
description: Integrate PolyPay payment acceptance and merchant automation into production applications. Use when Codex needs to add or repair PolyPay hosted checkout, JavaScript browser checkout, PHP SDK or server REST API integration, webhook verification, sandbox testing, x402 agent payments, Notification Center channels or templates, PolyPay MCP access, or WordPress, WooCommerce, WHMCS, and Shopify payment flows. Also trigger for legacy PonponPay integration requests.PolyPay Production Integration
Integrate the smallest complete PolyPay flow that matches the host application. Preserve existing architecture and prove the result without exposing credentials or charging real funds by default.
Resolve the Integration Mode
Inspect the host framework, runtime, order model, existing payment abstraction, callback routes, package manager, and test commands before editing.
Treat these references as a tested capability snapshot. Before coding against a mutable API, compare them with the installed package types and current official PolyPay documentation. Prefer, in order: the target application's locked dependency types, current official documentation, then this Skill's references. If they conflict, follow the newer authoritative contract and report the Skill drift instead of guessing.
Choose one primary mode:
- Use hosted checkout for normal customer payments. Let PolyPay own payment-method selection unless the merchant already knows both currency and network.
- Use
@polypay/sdk/browserfor browser checkout with a Public Key and server-generated signed parameters. - Use
polypay/php-sdkfor PHP server-side hosted checkout, direct orders, status queries, webhook verification, and x402. - Use PolyPay REST endpoints for ordinary Node.js server-side API Key order operations. Do not initialize
PolyPayClientwith an API Key; that client is browser-only and accepts a Public Key. - Use
@polypay/sdk/x402only for server-side JavaScript/TypeScript x402 resources. - Reuse the official platform plugin or its conventions for WordPress, WooCommerce, WHMCS, or Shopify.
- Use PolyPay MCP when the user wants an AI client to operate merchant resources rather than embed checkout code.
Load Only the Required References
- Read references/checkout.md for hosted checkout, Public Key, API Key, direct-order, locale, and sandbox flows.
- Read references/webhooks.md whenever payment state changes local data.
- Read references/x402.md for paid API or Agent resource requests.
- Read references/notifications.md for channels, templates, delivery, or wallet events.
- Read references/mcp.md for AI-client access to merchant tools.
- Read references/platforms.md for framework and commerce-platform constraints.
Read every reference relevant to the request before implementation. Do not load unrelated references.
Enforce Production Safety
- Keep API Keys in server-only secret storage. Never place them in browser code, mobile code, URLs, logs, examples with real values, or committed files.
- Allow Public Keys in browser code only after the merchant configures the exact allowed domains.
- Generate hosted-checkout signatures on a trusted server and pass signed parameters to the browser. Never invent or omit the required signature.
- Treat verified webhooks or an authenticated server-side reconciliation query as the source of truth. Never mark an order paid from a redirect, popup close, client poll result alone, or Agent message.
- Make webhook handling and fulfillment idempotent using stable event, trade, merchant-order, transaction, or nonce identifiers.
- Use Sandbox first for checkout and order flows. Use mocks and protocol test vectors for x402 until the user explicitly authorizes a low-value production settlement. Do not perform a production charge, settlement, webhook resend, or external write without that authorization.
- Preserve the platform trade ID and merchant order ID mapping.
- Validate callback and redirect URLs, use HTTPS in production, and avoid open redirects.
- Keep x402 settlement and merchant API Keys out of public bundles.
Implement the Complete Slice
- Confirm the selected integration mode and required identifiers.
- Add only the required dependency and environment-variable names.
- Implement order or checkout creation, redirect, and error handling.
- Implement verified, replay-resistant, idempotent payment-state handling when local state changes.
- Reconcile ambiguous or delayed states through an authenticated server-side query.
- Preserve localized user-facing copy and the host application's existing patterns.
- Add focused tests for success, invalid signature, duplicate delivery, expired order, and missing configuration where applicable.
- Run the repository's typecheck, tests, lint, or build commands that cover the changed paths.
Require Release Evidence
Before reporting completion, verify as many of these as the environment permits:
- A Sandbox order or hosted-checkout URL is created with the expected merchant order ID.
- The default checkout URL is locale-neutral; an explicit locale produces a localized path.
- No secret appears in generated client assets, source control, logs, or returned URLs.
- A valid webhook changes state exactly once, while invalid, expired, or replayed signatures do not.
- Redirect success without verified payment does not mark the order paid.
- x402 returns HTTP 402 before payment and protected content only after successful verification and settlement.
- Required checks pass and the manual verification path is documented.
If credentials or a running environment are unavailable, complete static validation and report the exact unverified runtime steps. Do not claim end-to-end success without evidence.
Stop and Escalate
Stop and ask for direction when:
- The requested design exposes an API Key or settlement capability to an untrusted client.
- The host lacks a stable merchant order identifier or a safe idempotency boundary.
- The user wants client redirects to be the paid-state authority.
- The requested currency, network, x402 scheme, or platform capability is not supported by the current reference.
- Completing the task requires a real production payment or a new external credential not provided by the user.
Report the Result
Report the selected mode, changed files, dependencies, environment-variable names, tests run, manual Sandbox path, and any remaining production verification. Never print credential values.
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 高价值支付集成工具,直接解决生产环境的核心任务痛点
- 覆盖多种集成模式(hosted checkout、JavaScript、PHP SDK、REST API、x402、平台插件)
- 支持主流电商平台(WordPress、WooCommerce、WHMCS、Shopify)
Highlights
- 触发词精准完整,覆盖多种变体(PolyPay、PonponPay)
- 边界清晰,明确区分不同集成场景和平台
- 包含具体技术栈和用例描述
Highlights
- Phase/步骤清晰,有明确的出口条件和停止条件
- 包含端到端示例和验证要求
- frontmatter完整,结构组织良好
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常(无效签名、重复交付、过期订单)
- 不可逆操作有确认机制(生产支付需显式授权)
- 强调安全最佳实践(密钥管理、webhook验证)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 8, 21, 28, 72, 78
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.