360 Secure SkillHub
360 安全技能中心

Native Stripe

该工具直接对接Stripe官方API,可查询账单、客户、订阅等多类数据,支持筛选、分页,还能创建退款、更新客户信息。典型场景如查看近期账单、按邮箱搜客户等。需先配置Stripe密钥环境变量,通过Python命令传参操作,输出默认列表为表格、单对象为JSON,可加--json获取原生JSON。

codeninja23
codeninja23
热度 67.34
最近更新 2026-05-18 12:07:12
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:财务 / 自动化脚本 / 数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add native-stripe
Metadata
name
stripe
description
Query and manage Stripe data via the Stripe API. Use when you need to list charges, customers, invoices, subscriptions, payment intents, refunds, products, or prices. Supports filtering, pagination, and creating/updating customers and refunds. Calls api.stripe.com directly with no third-party proxy.
metadata
{"openclaw":{"requires":{"env":["STRIPE_SECRET_KEY"],"bins":["python3"]},"primaryEnv":"STRIPE_SECRET_KEY","files":["scripts/*"]}}

Stripe

Interact with your Stripe account directly via the Stripe API (api.stripe.com).

Setup (one-time)

  1. Get your secret key from https://dashboard.stripe.com/apikeys
  2. Set environment variable:
    STRIPE_SECRET_KEY=sk_live_...
    
    Use sk_test_... for test mode.

Queries

List recent charges

python3 /mnt/skills/user/stripe/scripts/stripe_query.py charges --limit 10

List customers

python3 /mnt/skills/user/stripe/scripts/stripe_query.py customers --limit 20

Search customers by email

python3 /mnt/skills/user/stripe/scripts/stripe_query.py customers --email user@example.com

List subscriptions

python3 /mnt/skills/user/stripe/scripts/stripe_query.py subscriptions --limit 20

List active subscriptions

python3 /mnt/skills/user/stripe/scripts/stripe_query.py subscriptions --status active --limit 20

List invoices

python3 /mnt/skills/user/stripe/scripts/stripe_query.py invoices --limit 20

List payment intents

python3 /mnt/skills/user/stripe/scripts/stripe_query.py payment_intents --limit 20

List products

python3 /mnt/skills/user/stripe/scripts/stripe_query.py products --limit 20

List prices

python3 /mnt/skills/user/stripe/scripts/stripe_query.py prices --limit 20

List refunds

python3 /mnt/skills/user/stripe/scripts/stripe_query.py refunds --limit 20

Get a specific object

python3 /mnt/skills/user/stripe/scripts/stripe_query.py get charges ch_abc123
python3 /mnt/skills/user/stripe/scripts/stripe_query.py get customers cus_abc123
python3 /mnt/skills/user/stripe/scripts/stripe_query.py get subscriptions sub_abc123

Create a refund

python3 /mnt/skills/user/stripe/scripts/stripe_query.py create refunds --charge ch_abc123
python3 /mnt/skills/user/stripe/scripts/stripe_query.py create refunds --charge ch_abc123 --amount 1000

Update a customer

python3 /mnt/skills/user/stripe/scripts/stripe_query.py update customers cus_abc123 --email new@example.com --name "New Name"

Output

Formatted table for lists, JSON for single objects. Use --json flag for raw JSON on any command.

Resources

  • charges, customers, invoices, subscriptions, payment_intents, refunds, products, prices, balance_transactions