oen-payment
Help developers integrate with the Oen Payment (應援金流) REST API — a unified payment gateway supporting credit cards, LINE Pay, and CVS (convenience store) payments.
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
___ ____ _
/ _ \ ___ _ __ | _ \ __ _ _ _ _ __ ___ ___ _ __ | |_
| | | |/ _ \ '_ \ | |_) / _` | | | | '_ ` _ \ / _ \ '_ \| __|
| |_| | __/ | | | | __/ (_| | |_| | | | | | | __/ | | | |_
\___/ \___|_| |_| |_| \__,_|\__, |_| |_| |_|\___|_| |_|\__|
|___/
____ _ _ _ _
/ ___|| | _(_) | |
\___ \| |/ / | | |
___) | <| | | |
|____/|_|\_\_|_|_|
Oen Payment Skill — 應援金流 AI 技能
讓你的 AI 編程助手成為金流整合專家
這是一個 AI 編程助手技能(Skill),協助開發者快速整合 Oen Payment(應援金流) REST API。安裝後,AI 助手會在你提及金流相關需求時自動啟用,提供 API 串接指引、程式碼生成、錯誤排查等服務。
相容的 AI 編程助手
本技能採用標準 SKILL.md 格式,相容於所有支援此規範的 AI 編程框架:
| 框架 | 技能目錄 | 狀態 |
|---|---|---|
| Claude Code | ~/.claude/skills/ 或 .claude/skills/ | 已驗證 |
| OpenClaw | ~/.openclaw/skills/ | 已驗證 |
| 其他支援 SKILL.md 的框架 | 依框架文件設定 | 應相容 |
技能本身為純 Markdown + YAML frontmatter,不依賴任何框架特定的 API 或工具呼叫。
功能特色
- API 串接引導 — 逐步引導你完成付款頁面建立、定期定額、退款、交易查詢等操作
- 多語言程式碼生成 — 產生可直接使用的 TypeScript、JavaScript、Python 或 cURL 範例程式碼
- 錯誤排查 — 根據回應碼對照表快速診斷問題,提供解決建議
- MCP Server 設定 — 引導設定 Oen Payment MCP Server,實現 AI 輔助的金流操作
- 完整 API 文件 — 內建所有 endpoint 的請求格式、回應格式、範例和測試卡號
支援的付款方式
| 付款方式 | 說明 |
|---|---|
| 信用卡 | VISA、Mastercard、JCB(預設付款方式) |
| LINE Pay | 需另外申請開通,開通後至 CRM 設定 LINE Pay token |
| 超商代碼 | 全家便利商店繳費 |
安裝方式
Claude Code
# 全域安裝(所有專案可用)
git clone https://github.com/OEN-Tech/oen-payment-skill.git ~/.claude/skills/oen-payment
# 或專案級安裝(僅限當前專案)
git clone https://github.com/OEN-Tech/oen-payment-skill.git .claude/skills/oen-payment
OpenClaw
git clone https://github.com/OEN-Tech/oen-payment-skill.git ~/.openclaw/skills/oen-payment
其他框架
將本 repo 複製到你的框架所指定的技能目錄即可。核心檔案為 SKILL.md,技能載入時會讀取此檔案及 references/ 目錄下的參考文件。
安裝完成後,重新啟動你的 AI 編程助手即可生效。
使用方式
安裝後,當你在 AI 助手中提及以下關鍵字時,技能會自動觸發:
oen payment、應援金流、oen 金流- 付款、結帳、checkout
- 定期定額、subscription
- 退款、refund
- 交易查詢、transaction
範例對話
> 幫我用 TypeScript 串接 Oen Payment 建立一個結帳頁面
> 如何設定 Oen Payment 的 webhook?
> 退款時收到 T0001 錯誤碼是什麼意思?
> 幫我建立一個每月扣款 500 元的定期定額
搭配 MCP Server 使用
除了此技能外,你也可以安裝 Oen Payment MCP Server 來取得即時的金流操作能力(建立交易、查詢交易、退款等)。MCP Server 可搭配任何支援 MCP 協定的 AI 工具使用。
快速設定
- 設定 GitHub Packages 存取權限:
echo "@OEN-Tech:registry=https://npm.pkg.github.com" >> ~/.npmrc
echo "//npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN" >> ~/.npmrc
- 在你的 AI 工具的 MCP 設定中加入:
{
"mcpServers": {
"oen-payment": {
"command": "npx",
"args": [
"-y",
"@OEN-Tech/oen-payment-mcp-server@latest",
"--token=YOUR_API_TOKEN",
"--merchantId=YOUR_MERCHANT_ID",
"--env=testing"
]
}
}
}
- 將
YOUR_API_TOKEN替換為從應援 CRM 後台取得的 API Token,YOUR_MERCHANT_ID替換為你的網域名稱。
API 快速參考
主要 Endpoint
| 操作 | Method | Endpoint |
|---|---|---|
| 建立單次付款頁面 | POST | /checkout |
| 建立定期定額 | POST | /checkout-subscription |
| 建立排程定期定額 | POST | /checkout-schedule |
| 3D 驗證取得 Token | POST | /checkout-token |
| 查詢交易明細 | GET | /transactions/:id |
| 查詢交易列表 | GET | /transactions |
| 用訂單查詢交易 | GET | /order/:orderId/transactions |
| 查詢定期定額明細 | GET | /subscriptions/:subscriptionId |
| 取消定期定額 | PUT | /subscriptions/:subscriptionId |
| 退款 | POST | /refunds/:transactionHid |
環境
| 環境 | API 位址 | 結帳頁面 |
|---|---|---|
| 正式環境 | https://payment-api.oen.tw | https://{merchantId}.oen.tw |
| 測試環境 | https://payment-api.testing.oen.tw | https://{merchantId}.testing.oen.tw |
測試卡號
| 卡號 | 用途 |
|---|---|
4242 4242 4242 4242 | 成功交易 |
4000 0000 0000 2503 | 觸發 3D 驗證 |
5200 0000 0000 2151 | 觸發 3D 驗證 |
4012 8888 1888 8333 | 觸發失敗情境 |
測試提示:金額 > 100 為成功情境,金額 < 100 為失敗情境
系統回應代碼
| 代碼 | 說明 |
|---|---|
| S0000 | 執行成功 |
| A0001 | 未授權 |
| V0001 | 請求錯誤 |
| V0002 | 交易狀態錯誤 |
| T0001 | 交易失敗 |
| T0002 | 安全碼 CVV 錯誤 |
| T0003 | 卡片過期 |
| T0004 | 額度不足 |
| T0005 | 拒絕授權 |
| F0001 | 系統錯誤 |
檔案結構
oen-payment-skill/
├── SKILL.md # 技能定義檔(AI 助手載入此檔)
├── references/
│ └── api-docs.md # 完整 API 文件參考
├── README.md # 本文件
└── LICENSE # MIT 授權
相關資源
授權
MIT License — 詳見 LICENSE
Power by the Oen Team
// HOW IT'S BUILT
KEY FILES