jpskill.com
📦 その他 コミュニティ

square

Squareは、対面やオンラインでの支払い受付、クレジットカード処理、在庫管理、定期購読管理、POS連携など、ビジネスにおける決済と商取引全般を支援するSkill。

📜 元の英語説明(参考)

Accept payments and manage commerce with Square. Use when a user asks to accept in-person and online payments, process credit cards, manage inventory, handle subscriptions, or build a POS integration.

🇯🇵 日本人クリエイター向け解説

一言でいうと

Squareは、対面やオンラインでの支払い受付、クレジットカード処理、在庫管理、定期購読管理、POS連携など、ビジネスにおける決済と商取引全般を支援するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o square.zip https://jpskill.com/download/15411.zip && unzip -o square.zip && rm square.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/15411.zip -OutFile "$d\square.zip"; Expand-Archive "$d\square.zip" -DestinationPath $d -Force; ri "$d\square.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して square.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → square フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Square

概要

Square は、クレジットカード、Apple Pay、Google Pay、および POS ハードウェアによるオンラインおよび対面での支払いを処理します。API は、支払い、サブスクリプション、請求書、カタログ、在庫、および顧客を網羅しています。オンラインと実店舗の両方で販売するビジネスに人気があります。

手順

ステップ 1: オンライン決済

// lib/square.ts — 支払いの処理
import { Client, Environment } from 'square'

const client = new Client({
  accessToken: process.env.SQUARE_ACCESS_TOKEN!,
  environment: Environment.Production,
})

export async function createPayment(amount: number, currency: string, sourceId: string) {
  const { result } = await client.paymentsApi.createPayment({
    sourceId,         // Web Payments SDK からの支払いトークン
    idempotencyKey: crypto.randomUUID(),
    amountMoney: {
      amount: BigInt(amount),    // 最小通貨単位 (セント)
      currency,
    },
  })
  return result.payment
}

ステップ 2: Web Payments SDK (フロントエンド)

// components/SquarePayment.tsx — 支払いフォーム
const payments = Square.payments(appId, locationId)
const card = await payments.card()
await card.attach('#card-container')

document.getElementById('pay-btn').addEventListener('click', async () => {
  const result = await card.tokenize()
  if (result.status === 'OK') {
    // result.token をサーバーに送信
    await fetch('/api/pay', {
      method: 'POST',
      body: JSON.stringify({ sourceId: result.token, amount: 2999 }),
    })
  }
})

ステップ 3: カタログと在庫

// 製品と在庫の管理
const { result } = await client.catalogApi.upsertCatalogObject({
  idempotencyKey: crypto.randomUUID(),
  object: {
    type: 'ITEM',
    id: '#coffee-mug',
    itemData: {
      name: 'Coffee Mug',
      variations: [{
        type: 'ITEM_VARIATION',
        id: '#coffee-mug-regular',
        itemVariationData: {
          name: 'Regular',
          pricingType: 'FIXED_PRICING',
          priceMoney: { amount: BigInt(1499), currency: 'USD' },
        },
      }],
    },
  },
})

ガイドライン

  • Square は、オンライン取引ごとに 2.9% + $0.30 を請求します。対面の場合: 2.6% + $0.10。
  • 基本的な処理に月額料金はかかりません。サブスクリプションは $0/月から始まります。
  • Square は、オムニチャネル (オンライン + 実店舗) に最適です — 在庫と顧客が同期されます。
  • オンラインのみの SaaS 請求の場合、Stripe または Paddle の方が通常は良い選択肢です。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Square

Overview

Square handles both online and in-person payments — credit cards, Apple Pay, Google Pay, and POS hardware. APIs cover payments, subscriptions, invoices, catalog, inventory, and customers. Popular for businesses that sell both online and in stores.

Instructions

Step 1: Online Payment

// lib/square.ts — Process a payment
import { Client, Environment } from 'square'

const client = new Client({
  accessToken: process.env.SQUARE_ACCESS_TOKEN!,
  environment: Environment.Production,
})

export async function createPayment(amount: number, currency: string, sourceId: string) {
  const { result } = await client.paymentsApi.createPayment({
    sourceId,         // payment token from Web Payments SDK
    idempotencyKey: crypto.randomUUID(),
    amountMoney: {
      amount: BigInt(amount),    // in smallest currency unit (cents)
      currency,
    },
  })
  return result.payment
}

Step 2: Web Payments SDK (Frontend)

// components/SquarePayment.tsx — Payment form
const payments = Square.payments(appId, locationId)
const card = await payments.card()
await card.attach('#card-container')

document.getElementById('pay-btn').addEventListener('click', async () => {
  const result = await card.tokenize()
  if (result.status === 'OK') {
    // Send result.token to your server
    await fetch('/api/pay', {
      method: 'POST',
      body: JSON.stringify({ sourceId: result.token, amount: 2999 }),
    })
  }
})

Step 3: Catalog and Inventory

// Manage products and inventory
const { result } = await client.catalogApi.upsertCatalogObject({
  idempotencyKey: crypto.randomUUID(),
  object: {
    type: 'ITEM',
    id: '#coffee-mug',
    itemData: {
      name: 'Coffee Mug',
      variations: [{
        type: 'ITEM_VARIATION',
        id: '#coffee-mug-regular',
        itemVariationData: {
          name: 'Regular',
          pricingType: 'FIXED_PRICING',
          priceMoney: { amount: BigInt(1499), currency: 'USD' },
        },
      }],
    },
  },
})

Guidelines

  • Square charges 2.9% + $0.30 per online transaction. In-person: 2.6% + $0.10.
  • No monthly fees for basic processing. Subscriptions start at $0/month.
  • Square is strongest for omnichannel (online + physical store) — synced inventory and customers.
  • For online-only SaaS billing, Stripe or Paddle are usually better choices.