backend/.claude/skills/coinbase-cdp-integration/SKILL.md
Integrate Coinbase crypto payments into payment systems. Use when: (1) adding crypto payment support, (2) building onchain features, (3) implementing wallet functionality. Covers Coinbase Commerce (payment processor) vs CDP (developer platform), Server Wallets, Embedded Wallets, and multi-network support.
npx skillsauth add Ritenoob/ridedine coinbase-cdp-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Integrating cryptocurrency payments requires choosing between Coinbase's two products: Coinbase Commerce (simple payment processor) vs CDP (comprehensive developer platform), understanding their differences, and implementing the right solution.
Use this skill when:
Purpose: Accept crypto payments from customers (like Stripe for crypto)
Features:
Use when:
API: https://commerce.coinbase.com/
Docs: https://docs.cloud.coinbase.com/commerce/docs
Purpose: Build onchain applications with wallets, transactions, and blockchain APIs
Features:
Networks supported:
Use when:
API: https://docs.cdp.coinbase.com/api-reference/v2/introduction
Portal: https://portal.cdp.coinbase.com/
Stack: Coinbase Commerce + Webhooks
// 1. Create charge (server-side)
const charge = await coinbaseCommerce.charges.create({
name: "Order #123",
description: "Customer order",
pricing_type: "fixed_price",
local_price: {
amount: "100.00",
currency: "USD"
},
metadata: {
order_id: "order-123"
}
});
// 2. Redirect user to charge.hosted_url
window.location.href = charge.hosted_url;
// 3. Handle webhook for payment confirmation
// POST /webhooks/coinbase
// Verify signature, update order status
Stack: CDP Embedded Wallets + Onramp
// 1. Initialize CDP SDK
import { Coinbase } from "@coinbase/coinbase-sdk";
const coinbase = new Coinbase({
apiKeyName: process.env.CDP_API_KEY_NAME,
privateKey: process.env.CDP_PRIVATE_KEY
});
// 2. Create user wallet
const wallet = await coinbase.createWallet({
networkId: "base-mainnet"
});
// 3. Fund with onramp (Apple Pay)
const onrampSession = await coinbase.createOnrampSession({
walletAddress: wallet.address,
amount: "50.00",
currency: "USD",
paymentMethod: "apple_pay"
});
// 4. Send transaction
const transaction = await wallet.sendTransaction({
to: recipientAddress,
amount: "10.0",
asset: "USDC"
});
Stack: CDP Server Wallets v2 + Policy Engine
// 1. Create server wallet with policies
const wallet = await coinbase.createServerWallet({
networkId: "base-mainnet",
policies: [
{
type: "transfer_limit",
asset: "USDC",
maxAmount: "1000.00",
timeWindow: "24h"
},
{
type: "allowlist",
addresses: [recipient1, recipient2, recipient3]
}
]
});
// 2. Batch payouts (250 TPS)
const payouts = await wallet.batchTransfer([
{ to: employee1, amount: "500", asset: "USDC" },
{ to: employee2, amount: "750", asset: "USDC" },
{ to: employee3, amount: "600", asset: "USDC" }
]);
Need crypto payments?
├─ Just accept payments → Coinbase Commerce
│ └─ Simple checkout, webhooks, fiat conversion
│
└─ Build onchain features → CDP
├─ User wallets needed?
│ ├─ Yes, users manage → Embedded Wallets
│ └─ No, backend managed → Server Wallets v2
│
├─ Need fiat onramp?
│ └─ Yes → Onramp API (Apple Pay, card)
│
├─ Transaction governance?
│ └─ Yes → Policy Engine (limits, allowlists)
│
└─ Multi-chain support?
└─ Yes → Smart Accounts (EVM) or Solana APIs
| Feature | Coinbase Commerce | CDP | |---------|------------------|-----| | Purpose | Accept payments | Build onchain apps | | Custody | Coinbase holds funds | You control wallets | | Networks | Bitcoin, Ethereum, others | EVM + Solana (programmable) | | Complexity | Simple (like Stripe) | Advanced (blockchain APIs) | | Use case | E-commerce checkout | DeFi, NFTs, onchain logic | | Pricing | 1% transaction fee | API usage-based | | Wallet creation | No | Yes (embedded or server) | | Fiat conversion | Automatic | Via Onramp API |
Current: Coinbase Commerce for crypto checkout
create_crypto_payment (creates Commerce charge)webhook_coinbase (handles payment events)crypto_payments table tracks blockchain confirmationsPotential CDP Upgrades:
development
Add Apple Pay and Google Pay to Stripe checkout. Use when: (1) adding mobile wallet payments, (2) improving mobile conversion, (3) implementing one-tap checkout. Stripe Payment Request Button automatically detects device capabilities and shows Apple Pay (Safari/iOS) or Google Pay (Chrome/Android).
development
Master Vercel deployment for RidenDine web and admin Next.js apps. Use when: (1) deploying to production, (2) configuring environment variables, (3) setting up preview deployments, (4) debugging build failures, (5) configuring domains, (6) seeing "No Next.js version detected" error in Vercel builds, (7) setting up monorepo with separate projects on free tier. Key insight: Vercel monorepos require Root Directory configuration via dashboard (not vercel.json), GitHub integration auto-detects monorepo structure, free tier allows multiple projects.
development
Master Supabase Row Level Security (RLS) for RidenDine. Use when: (1) adding new tables, (2) modifying RLS policies, (3) debugging access control issues, (4) role-based data access. Key insight: All tables use RLS with role-based policies from profiles.role column.
tools
Master Supabase database migrations for RidenDine. Use when: (1) creating new migrations, (2) modifying schema, (3) adding RLS policies, (4) rolling back changes, (5) deploying to production. Key insight: Migrations are SQL files in backend/supabase/migrations/ executed in lexicographical order. Use supabase CLI to generate timestamps and apply migrations.