Stripe

TotalClaw 作者 ramonverse v1.0.0

从同步的 PostgreSQL 数据库查询 Stripe 客户和账单数据。当用户询问 Stripe 客户、订阅、发票、费用或任何 Stripe 相关数据时使用。

源码 ↗

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:ramonverse~ramonverse-paymentsdb
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Aramonverse~ramonverse-paymentsdb/file -o ramonverse-paymentsdb.md
Git 仓库获取源码
git clone https://github.com/openclaw/skills/commit/57a2919fdf80238cd8b00306d99110163fba6cdb
## 概述(中文)

从同步的 PostgreSQL 数据库查询 Stripe 客户和账单数据。当用户询问 Stripe 客户、订阅、发票、费用或任何 Stripe 相关数据时使用。

## 原文

All the stripe data is sync in a postgresdb. You can query this db via exec by simply running ./query.sh "SELECT now();"

all the tables are under "stripe" schema and these are the tables:

CREATE TABLE stripe.accounts (
    _raw_data jsonb NOT NULL,
    first_synced_at timestamp with time zone DEFAULT now() NOT NULL,
    _last_synced_at timestamp with time zone DEFAULT now() NOT NULL,
    _updated_at timestamp with time zone DEFAULT now() NOT NULL,
    business_name text,
    email text,
    type text,
    charges_enabled boolean,
    payouts_enabled boolean,
    details_submitted boolean,
    country text,
    default_currency text,
    created integer,
    api_key_hashes text[] DEFAULT '{}'::text[],
    id text,
);

CREATE TABLE stripe.active_entitlements (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    livemode boolean,
    feature text,
    customer text,
    lookup_key text,
    id text,
);

CREATE TABLE stripe.balance_transactions (
    _raw_data jsonb NOT NULL,
    _last_synced_at timestamp with time zone,
    _updated_at timestamp with time zone DEFAULT now(),
    _account_id text NOT NULL,
    id text,
    object text,
    amount bigint,
    available_on integer,
    created integer,
    currency text,
    description text,
    exchange_rate numeric,
    fee bigint,
    fee_details jsonb,
    net bigint,
    reporting_category text,
    source text,
    status text,
    type text,
);

CREATE TABLE stripe.charges (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    paid boolean,
    "order" text,
    amount bigint,
    review text,
    source jsonb,
    status text,
    created integer,
    dispute text,
    invoice text,
    outcome jsonb,
    refunds jsonb,
    updated integer,
    captured boolean,
    currency text,
    customer text,
    livemode boolean,
    metadata jsonb,
    refunded boolean,
    shipping jsonb,
    application text,
    description text,
    destination text,
    failure_code text,
    on_behalf_of text,
    fraud_details jsonb,
    receipt_email text,
    payment_intent text,
    receipt_number text,
    transfer_group text,
    amount_refunded bigint,
    application_fee text,
    failure_message text,
    source_transfer text,
    balance_transaction text,
    statement_descriptor text,
    payment_method_details jsonb,
    id text,
);

CREATE TABLE stripe.checkout_session_line_items (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    currency text,
    description text,
    price text,
    quantity integer,
    checkout_session text,
    id text,
    amount_discount bigint,
    amount_subtotal bigint,
    amount_tax bigint,
    amount_total bigint,
);

CREATE TABLE stripe.checkout_sessions (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    adaptive_pricing jsonb,
    after_expiration jsonb,
    allow_promotion_codes boolean,
    automatic_tax jsonb,
    billing_address_collection text,
    cancel_url text,
    client_reference_id text,
    client_secret text,
    collected_information jsonb,
    consent jsonb,
    consent_collection jsonb,
    created integer,
    currency text,
    currency_conversion jsonb,
    custom_fields jsonb,
    custom_text jsonb,
    customer text,
    customer_creation text,
    customer_details jsonb,
    customer_email text,
    discounts jsonb,
    expires_at integer,
    invoice text,
    invoice_creation jsonb,
    livemode boolean,
    locale text,
    metadata jsonb,
    mode text,
    optional_items jsonb,
    payment_intent text,
    payment_link text,
    payment_method_collection text,
    payment_method_configuration_details jsonb,
    payment_method_options jsonb,
    payment_method_types jsonb,
    payment_status text,
    permissions jsonb,
    phone_number_collection jsonb,
    presentment_details jsonb,
    recovered_from text,
    redirect_on_completion text,
    return_url text,
    saved_payment_method_options jsonb,
    setup_intent text,
    shipping_address_collection jsonb,
    shipping_cost jsonb,
    shipping_details jsonb,
    shipping_options jsonb,
    status text,
    submit_type text,
    subscription text,
    success_url text,
    tax_id_collection jsonb,
    total_details jsonb,
    ui_mode text,
    url text,
    wallet_options jsonb,
    id text,
    amount_subtotal bigint,
    amount_total bigint,
);

CREATE TABLE stripe.coupons (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    object text,
    name text,
    valid boolean,
    created integer,
    updated integer,
    currency text,
    duration text,
    livemode boolean,
    metadata jsonb,
    redeem_by integer,
    amount_off bigint,
    percent_off double precision,
    times_redeemed bigint,
    max_redemptions bigint,
    duration_in_months bigint,
    percent_off_precise double precision,
    id text,
);

CREATE TABLE stripe.credit_notes (
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    created integer,
    currency text,
    customer text,
    customer_balance_transaction text,
    discount_amounts jsonb,
    invoice text,
    lines jsonb,
    livemode boolean,
    memo text,
    metadata jsonb,
    number text,
    pdf text,
    reason text,
    refund text,
    shipping_cost jsonb,
    status text,
    tax_amounts jsonb,
    type text,
    voided_at text,
    id text,
    amount bigint,
    amount_shipping bigint,
    discount_amount bigint,
    out_of_band_amount bigint,
    subtotal bigint,
    subtotal_excluding_tax bigint,
    total bigint,
    total_excluding_tax bigint,
);

CREATE TABLE stripe.customers (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    address jsonb,
    description text,
    email text,
    metadata jsonb,
    name text,
    phone text,
    shipping jsonb,
    created integer,
    currency text,
    default_source text,
    delinquent boolean,
    discount jsonb,
    invoice_prefix text,
    invoice_settings jsonb,
    livemode boolean,
    next_invoice_sequence integer,
    preferred_locales jsonb,
    tax_exempt text,
    deleted boolean,
    id text,
    balance bigint,
);

CREATE TABLE stripe.disputes (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    amount bigint,
    charge text,
    reason text,
    status text,
    created integer,
    updated integer,
    currency text,
    evidence jsonb,
    livemode boolean,
    metadata jsonb,
    evidence_details jsonb,
    balance_transactions jsonb,
    is_charge_refundable boolean,
    payment_intent text,
    id text,
);

CREATE TABLE stripe.early_fraud_warnings (
    _updated_at timestamp with time zone DEFAULT timezone('utc'::text, now()) NOT NULL,
    _last_synced_at timestamp with time zone,
    _raw_data jsonb,
    _account_id text NOT NULL,
    object text,
    actionable boolean,
    charge text,
    created integer,
    fraud_type text,
    livemode boolean,
    payment_intent text,
    id text