# Kryptogo Pay Query

> >

- **Type:** Skill
- **Install:** `agentstack add skill-paid-tw-skills-kryptogo-pay-query`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [paid-tw](https://agentstack.voostack.com/s/paid-tw)
- **Installs:** 0
- **Category:** [Finance & Payments](https://agentstack.voostack.com/c/finance-and-payments)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [paid-tw](https://github.com/paid-tw)
- **Source:** https://github.com/paid-tw/skills/tree/main/plugins/kryptogo-pay/skills/kryptogo-pay-query

## Install

```sh
agentstack add skill-paid-tw-skills-kryptogo-pay-query
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# KryptoGO Payment 交易查詢任務

你的任務是在用戶的專案中實作 KryptoGO Payment 交易查詢功能。

## Step 1: 確認需求

用戶輸入: `$ARGUMENTS`

詢問用戶：

1. **查詢情境**：需要什麼查詢功能？
   - 單筆 Payment Intent 查詢（客戶查詢、客服查詢）
   - 列表查詢與篩選（批次對帳、管理後台）
   - 支付狀態確認（Webhook 備援方案）

2. **專案框架**：你使用什麼框架？
   - 確認是否已有 KryptoGO Payment 環境設定

## Step 2: 建立查詢功能

在現有的支付模組中加入查詢方法，或建立新模組。

**核心功能:**
1. `getPaymentIntent(paymentIntentId)` - 查詢單筆 Payment Intent
2. `listPaymentIntents(filters)` - 列出 Payment Intents

## Step 3: 實作程式碼

根據框架加入查詢功能。

## Step 4: 整合到應用

建議整合方式：
- **API 端點**: `GET /api/payment/intent/:id`
- **管理後台**: 訂單詳情頁顯示即時狀態
- **定時任務**: 對帳排程（輪詢未完成的訂單）

---

## API 參考

### 查詢單筆 Payment Intent

| 項目 | 說明 |
|------|------|
| 方法 | `GET` |
| 路徑 | `/v1/studio/api/payment/intent/{payment_intent_id}` |
| Headers | `X-Client-ID`, `X-STUDIO-API-KEY`, `Origin` |

### 列出 Payment Intents

| 項目 | 說明 |
|------|------|
| 方法 | `GET` |
| 路徑 | `/v1/studio/api/payment/intents` |
| Headers | `X-Client-ID`, `X-STUDIO-API-KEY`, `Origin` |

### Payment Status 狀態

| 狀態 | 說明 |
|------|------|
| `pending` | 等待付款 |
| `success` | 付款成功 |
| `expired` | 付款逾時 |
| `insufficient_not_refunded` | 金額不足，等待退款 |
| `insufficient_refunded` | 金額不足，已退款 |

---

## 詳細參考文件

- [程式碼範例 (Node.js/Python)](references/code-examples.md)

---

## 常見錯誤

| 代碼 | 說明 | 解決方式 |
|------|------|---------|
| 4001 | Invalid client_id | 確認 `X-Client-ID` 正確 |
| 4002 | Invalid API key | 確認 `X-STUDIO-API-KEY` 正確 |
| 4006 | Invalid payment_intent_id | 確認 Payment Intent ID 存在 |

## Source & license

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

- **Author:** [paid-tw](https://github.com/paid-tw)
- **Source:** [paid-tw/skills](https://github.com/paid-tw/skills)
- **License:** MIT

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

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-paid-tw-skills-kryptogo-pay-query
- Seller: https://agentstack.voostack.com/s/paid-tw
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
