AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Kryptogo Pay Webhook

skill-paid-tw-skills-kryptogo-pay-webhook · by paid-tw

>

No reviews yet
0 installs
0 views
view→install

Install

$ agentstack add skill-paid-tw-skills-kryptogo-pay-webhook

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-paid-tw-skills-kryptogo-pay-webhook)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Kryptogo Pay Webhook? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

KryptoGO Payment Webhook 回調處理任務

你的任務是在用戶的專案中實作 KryptoGO Payment Webhook 回調處理。

串接 Checklist

  • [ ] 端點建立 - 建立 POST endpoint 接收回調
  • [ ] 狀態處理 - 處理所有 5 種支付狀態
  • [ ] 冪等處理 - 實作冪等性避免重複處理
  • [ ] 回應確認 - 回應 HTTP 200 確認收到
  • [ ] 測試驗證 - 驗證端點可正常運作

Step 1: 確認環境

詢問用戶:

  1. 框架類型:你使用什麼後端框架?
  • Node.js (Express / Fastify / NestJS)
  • Python (Django / Flask / FastAPI)
  • 其他
  1. 資料庫:使用什麼資料庫儲存訂單?
  • 需要知道如何更新訂單狀態

用戶輸入: $ARGUMENTS

Step 2: 建立 Webhook 端點

建立 POST 端點接收 KryptoGO 的回調通知。

端點路徑建議: /api/payment/callback/webhook/kryptogo

必要行為:

  1. 接收 POST JSON body
  2. 驗證 payment_intent_id 存在於資料庫
  3. 根據 status 更新訂單狀態
  4. 回應 HTTP 200

Step 3: 處理所有支付狀態

必須處理以下 5 種狀態:

| 狀態 | 處理邏輯 | |------|---------| | pending | 通常不會收到此狀態的回調 | | success | 更新訂單為已付款,記錄 payment_tx_hash | | expired | 標記訂單為過期 | | insufficient_not_refunded | 記錄異常,等待退款 | | insufficient_refunded | 記錄退款資訊 refund_tx_hashrefund_amount |

Step 4: 實作冪等性

確保同一個 payment_intent_id 的回調不會被重複處理:

  • 檢查訂單是否已經更新為最終狀態
  • 使用 payment_intent_id 作為冪等鍵

Step 5: 測試

  1. 建立一個 Payment Intent(帶 callback_url
  2. 完成支付後確認端點收到回調
  3. 驗證訂單狀態正確更新
  4. 驗證回應 HTTP 200

Callback Payload 格式

{
  "payment_intent_id": "0h39QkYfZps7AUD1xQsj3MDFVLIMaGoV",
  "client_id": "9c5a79fc1117310f976b53752659b61d",
  "fiat_amount": "300.0",
  "fiat_currency": "TWD",
  "payment_deadline": 1715462400,
  "status": "success",
  "payment_chain_id": "arb",
  "symbol": "USDT",
  "crypto_amount": "2.53",
  "payment_tx_hash": "0x1234567890abcdef...",
  "received_crypto_amount": "2.53",
  "aggregated_crypto_amount": "2.50",
  "order_data": {
    "order_id": "uid_12345",
    "item_id": "100"
  },
  "callback_url": "https://example.com/callback",
  "group_key": "buy_stone_with_usdt"
}

重要欄位

| 欄位 | 說明 | |------|------| | payment_intent_id | 用來比對你資料庫中的訂單 | | status | 判斷該做什麼處理 | | payment_tx_hash | 成功時的區塊鏈交易 Hash | | received_crypto_amount | 實際收到的加密貨幣金額 | | aggregated_crypto_amount | 扣除手續費後的金額 | | refund_tx_hash | 退款時的區塊鏈交易 Hash | | refund_amount | 退款金額 | | order_data | 你建立 Payment Intent 時傳入的自訂資料 |


詳細參考文件

  • [程式碼範例 (Node.js/Python)](references/code-examples.md)
  • [Callback Payload 完整格式](references/callback-payload.md)
  • [疑難排解](references/troubleshooting.md)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.