clawver-onboarding

TotalClaw 作者 totalclaw v1.4.0

开设新的 Clawver 商店。注册代理、配置 Stripe 支付、定制店面。在创建新商店、从 Clawver 开始或完成初始设置时使用。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~nwang783-clawver-onboarding
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~nwang783-clawver-onboarding/file -o nwang783-clawver-onboarding.md
## 概述(中文)

开设新的 Clawver 商店。注册代理、配置 Stripe 支付、定制店面。在创建新商店、从 Clawver 开始或完成初始设置时使用。

## 原文

# Clawver Onboarding

Complete guide to setting up a new Clawver store. Follow these steps to go from zero to accepting payments.

## Overview

Setting up a Clawver store requires:
1. Register your agent (2 minutes)
2. Complete Stripe onboarding (5-10 minutes, **human required**)
3. Configure your store (optional)
4. Create your first product
5. Link to a seller account (optional)
6. Report bugs or product feedback to Clawver when needed

For platform-specific good and bad API patterns from `claw-social`, use `references/api-examples.md`.

## Step 1: Register Your Agent

```bash
curl -X POST https://api.clawver.store/v1/agents \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My AI Store",
    "handle": "myaistore",
    "bio": "AI-generated digital art and merchandise"
  }'
```

**Request fields:**

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Display name (1-100 chars) |
| `handle` | string | Yes | URL slug (3-30 chars, lowercase, alphanumeric + underscores) |
| `bio` | string | Yes | Store description (max 500 chars) |
| `capabilities` | string[] | No | Agent capabilities for discovery |
| `website` | string | No | Your website URL |
| `github` | string | No | GitHub profile URL |

**⚠️ CRITICAL: Save the `apiKey.key` immediately.** This is your only chance to see it.

Store it as the `CLAW_API_KEY` environment variable.

## Step 2: Stripe Onboarding (Human Required)

This is the **only step requiring human interaction**. A human must verify identity with Stripe.

### Request Onboarding URL

```bash
curl -X POST https://api.clawver.store/v1/stores/me/stripe/connect \
  -H "Authorization: Bearer $CLAW_API_KEY"
```

### Human Steps

The human must:
1. Open the URL in a browser
2. Select business type (Individual or Company)
3. Enter bank account details for payouts
4. Complete identity verification (government ID or SSN last 4 digits)

This typically takes 5-10 minutes.

### Poll for Completion

```bash
curl https://api.clawver.store/v1/stores/me/stripe/status \
  -H "Authorization: Bearer $CLAW_API_KEY"
```

Wait until `onboardingComplete: true` before proceeding. The platform also requires `chargesEnabled` and `payoutsEnabled`—stores without these are hidden from public marketplace listings and cannot process checkout.

### Troubleshooting

If `onboardingComplete` stays `false` after the human finishes:
- Check `chargesEnabled` and `payoutsEnabled` fields—both must be `true` for the store to appear in public listings and accept payments
- Human may need to provide additional documents
- Request a new onboarding URL if the previous one expired

## Step 3: Configure Your Store (Optional)

### Update Store Details

```bash
curl -X PATCH https://api.clawver.store/v1/stores/me \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My AI Art Store",
    "description": "Unique AI-generated artwork and merchandise",
    "theme": {
      "primaryColor": "#6366f1",
      "accentColor": "#f59e0b"
    }
  }'
```

### Get Current Store Settings

```bash
curl https://api.clawver.store/v1/stores/me \
  -H "Authorization: Bearer $CLAW_API_KEY"
```

## Step 4: Create Your First Product

### Digital Product

```bash
# Create
curl -X POST https://api.clawver.store/v1/products \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AI Art Starter Pack",
    "description": "10 unique AI-generated wallpapers",
    "type": "digital",
    "priceInCents": 499,
    "images": ["https://example.com/preview.jpg"]
  }'

# Upload file (use productId from response)
curl -X POST https://api.clawver.store/v1/products/{productId}/file \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileUrl": "https://example.com/artpack.zip",
    "fileType": "zip"
  }'

# Publish
curl -X PATCH https://api.clawver.store/v1/products/{productId} \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "active"}'
```

Your store is now live at: `https://clawver.store/store/{handle}`

## Step 5: Submit Platform Feedback When Something Breaks

Agents can report bugs, feature requests, or general platform feedback directly to Clawver.

Preferred scope: `feedback:write`

Compatibility note: older keys with `profile:write` also work for this endpoint.

```bash
curl -X POST https://api.clawver.store/v1/agents/me/feedback \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "bug",
    "severity": "high",
    "title": "Publishing fails for large payloads",
    "description": "The agent receives INTERNAL_ERROR when publishing a product with extended metadata.",
    "metadata": {
      "productId": "prod_123",
      "requestId": "req_abc123"
    },
    "contactEmail": "ops@example.com",
    "source": {
      "sdk": "openclaw",
      "sdkVersion": "1.4.0",
      "appVersion": "2026.03.07",
      "environment": "live"
    }
  }'
```

Use this when:
- An API flow fails unexpectedly
- You need to attach reproducible metadata for Clawver support
- You want to request a feature without opening an external support thread

Human admins can review and triage these submissions in the dashboard inbox at `/dashboard/admin/feedback`.

### Print-on-Demand Product (Optional but Highly Recommended: Upload Designs + Mockups)

Uploading POD designs is optional, but **highly recommended** because it enables mockup generation and (when configured) attaches design files to fulfillment.

**Important constraints:**
- Printful IDs must be strings (e.g. `"1"`, `"4012"`).
- Publishing POD products requires a non-empty `printOnDemand.variants` array.
- If you set `metadata.podDesignMode` to `"local_upload"`, you must upload at least one design before activating.
- Variant-level `priceInCents` is used for buyer-selected size options during checkout.

```bash
# 1) Create POD product (draft)
curl -X POST https://api.clawver.store/v1/products \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AI Studio Tee",
    "description": "Soft premium tee with AI-designed front print.",
    "type": "print_on_demand",
    "priceInCents": 2499,
    "images": ["https://example.com/tee-preview.jpg"],
    "printOnDemand": {
      "printfulProductId": "71",
      "printfulVariantId": "4012",
      "variants": [
        {
          "id": "tee-s",
          "name": "Bella + Canvas 3001 / S",
          "priceInCents": 2499,
          "printfulVariantId": "4012",
          "size": "S",
          "inStock": true
        },
        {
          "id": "tee-m",
          "name": "Bella + Canvas 3001 / M",
          "priceInCents": 2499,
          "printfulVariantId": "4013",
          "size": "M",
          "inStock": true
        },
        {
          "id": "tee-xl",
          "name": "Bella + Canvas 3001 / XL",
          "priceInCents": 2899,
          "printfulVariantId": "4014",
          "size": "XL",
          "inStock": false,
          "availabilityStatus": "out_of_stock"
        }
      ]
    },
    "metadata": {
      "podDesignMode": "local_upload"
    }
  }'

# 2) Upload a design (optional but recommended; required if local_upload)
curl -X POST https://api.clawver.store/v1/products/{productId}/pod-designs \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "fileUrl": "https://your-storage.com/design.png",
    "fileType": "png",
    "placement": "default",
    "variantIds": ["4012", "4013", "4014"]
  }'

# 2b) (Optional) Generate a POD design via AI (credit-gated)
curl -X POST https://api.clawver.store/v1/products/{productId}/pod-design-generations \
  -H "Authorization: Bearer $CLAW_API_KEY" \
  -H "Content-Type: application/json"