Stripe Checkout Builder
Stripe Payments Skill

Create Stripe checkout sessions, payment links, invoices, and customers via Stripe REST API. Use when processing payments, sending invoices, or managing customer billing for a service business.
---
name: stripe-payments
description: "Create Stripe checkout sessions, payment links, invoices, and customers via Stripe REST API. Use when processing payments, sending invoices, or managing customer billing for a service business."
version: "1.0.0"
author: Hermes Agent
license: MIT
metadata:
hermes:
tags: [stripe, payments, invoicing, checkout, small-business]
related_skills: [lead-to-payment, crm-lite, estimator-engine, quickbooks-online]
---
# Stripe Payments Skill
## When to Use
- Customer needs to pay for an estimate/job
- Creating an invoice for a service
- Setting up a customer in Stripe for recurring billingOverview
All Stripe API calls use https://api.stripe.com/v1/ with Bearer auth.
Manual install (npx, ZIP)
Claude Code
npx skills add hewi333/Mom-n-Pop-Skills --skill stripe-payments -g -a claude-codeClaude Code (degit)
npx degit hewi333/Mom-n-Pop-Skills/skills/stripe-payments#main ~/.claude/skills/stripe-paymentsClaude.ai / desktop
Codex, Cursor, other agents
Connects with Agent Alley MCP · agentalley.io/mcp
Files included
SKILL.md8.2 KB
Read SKILL.md here
SKILL.md
Show the full text234 lines
Stripe Payments Skill
When to Use
- Customer needs to pay for an estimate/job
- Creating an invoice for a service
- Setting up a customer in Stripe for recurring billing
- Generating a payment link to send to a client
- Checking payment status for a job
- Agent needs to pay for its own SaaS subscriptions (hackathon "earn and spend" angle)
Prerequisites
- Stripe API key (secret key, starts with
sk_) - Stripe account in test mode for demos
- Stripe CLI installed for webhook testing (optional)
- Environment variable:
STRIPE_SECRET_KEY
Setup
1. Get API Key
- Log in to Stripe Dashboard (dashboard.stripe.com)
- Toggle "Test mode" on (top right)
- Developers > API Keys > Copy "Secret key" (sk_test_...)
2. Store Key in Hermes Environment
Add to ~/.hermes/.env:
STRIPE_SECRET_KEY=sk_tes...xxxx
3. Stripe CLI (optional, for local webhooks)
# Install
curl -sL https://github.com/stripe/stripe-cli/releases/latest/download/stripe_linux_x86_64.tar.gz | tar xz -C /usr/local/bin/
stripe login
stripe listen --forward-to localhost:8642/v1/stripe/webhook
API Reference
All Stripe API calls use https://api.stripe.com/v1/ with Bearer auth.
Create Customer
curl -s https://api.stripe.com/v1/customers \
-H "Authorization: Bearer $STRIP...KEY" \
-d name="John Smith" \
-d email="[email protected]" \
-d phone="555-555-1234" \
-d "metadata[business]=[BUSINESS_NAME]" \
-d "metadata[source]=Referral" \
-d "metadata[address]=123 Main St, [CITY], [STATE]"
Create Payment Link (simplest for demo)
curl -s https://api.stripe.com/v1/payment_links \
-H "Authorization: Bearer $STRIP...KEY" \
-d "line_items[0][price_data][currency]=usd" \
-d "line_items[0][price_data][unit_amount]=250000" \
-d "line_items[0][price_data][product_data][name]=Service - Residential 2000sqft" \
-d "line_items[0][quantity]=1" \
-d "metadata[customer_name]=John Smith" \
-d "metadata[service_type]=Residential" \
-d "metadata[sqft]=2000"
Returns a URL like https://buy.stripe.com/... you can send to the customer.
Create Checkout Session (more control)
curl -s https://api.stripe.com/v1/checkout/sessions \
-H "Authorization: Bearer $STRIP...KEY" \
-d mode=payment \
-d "success_url=https://yourdomain.com/success" \
-d "cancel_url=https://yourdomain.com/cancel" \
-d "[email protected]" \
-d "line_items[0][price_data][currency]=usd" \
-d "line_items[0][price_data][unit_amount]=250000" \
-d "line_items[0][price_data][product_data][name]=Service - Residential" \
-d "line_items[0][quantity]=1" \
-d "metadata[job_id]=JOB-0001-001" \
-d "metadata[estimate_amount]=2500"
Unit amount is in cents: $2,500.00 = 250000.
Create Invoice (for NET-30 billing)
# Step 1: Create invoice
INVOICE=$(curl -s https://api.stripe.com/v1/invoices \
-H "Authorization: Bearer $STRIP...KEY" \
-d customer=$CUSTOMER_ID \
-d "description=Service - Residential")
INVOICE_ID=$(echo "$INVOICE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# Step 2: Add line item
curl -s https://api.stripe.com/v1/invoiceitems \
-H "Authorization: Bearer $STRIP...KEY" \
-d customer=$CUSTOMER_ID \
-d invoice=$INVOICE_ID \
-d amount=250000 \
-d currency=usd \
-d "description=Service - Residential 2000sqft - Standard Region"
# Step 3: Finalize and send
curl -s https://api.stripe.com/v1/invoices/$INVOICE_ID/finalize \
-H "Authorization: Bearer $STRIP...KEY"
curl -s https://api.stripe.com/v1/invoices/$INVOICE_ID/send \
-H "Authorization: Bearer $STRIP...KEY"
Check Payment Status
curl -s https://api.stripe.com/v1/checkout/sessions/$SESSION_ID \
-H "Authorization: Bearer $STRIP...KEY" | python3 -m json.tool
# Look for "payment_status": "paid"
List All Payments
curl -s "https://api.stripe.com/v1/payment_intents?limit=10" \
-H "Authorization: Bearer $STRIP...KEY" | python3 -m json.tool
Refund (if needed)
curl -s https://api.stripe.com/v1/refunds \
-H "Authorization: Bearer $STRIP...KEY" \
-d payment_intent=$PI_ID \
-d amount=250000 # partial refund amount in cents, omit for full
Integration Patterns
Pattern 1: Estimate -> Payment Link (Quick Pay)
- Agent runs estimator-engine skill to calculate price
- Agent creates Stripe payment link for that amount
- Agent stores payment link URL in CRM (crm-lite)
- Agent emails link to customer via email skill
- Agent monitors payment status and updates CRM when paid
Pattern 2: Invoice -> Email -> Track (NET-30)
- Agent creates Stripe customer
- Agent creates invoice with line items
- Agent finalizes and sends invoice (Stripe emails customer)
- Agent logs invoice ID in CRM
- Agent checks payment status daily via cron job
Pattern 3: Agent Pays for Its Own SaaS (Hackathon Angle)
- Agent has Stripe Connected Account
- Agent creates payment link for a service
- Customer pays -> funds land in business Stripe account
- Agent uses Stripe to pay for Base44, Mailchimp, or other SaaS
- Demonstrates "agent that earns and spends real money"
Quick Start: Full Estimate-to-Payment Flow
# 1. Get customer info from CRM
CUSTOMER_NAME="John Smith"
CUSTOMER_EMAIL="[email protected]"
SQFT=2000
REGION="Standard"
# Price from estimator: 2000sf * $1.40/sf = $2,800 (example — use your configured rates)
AMOUNT=280000 # $2,800.00 in cents
# 2. Create Stripe customer
CUSTOMER=$(curl -s https://api.stripe.com/v1/customers \
-H "Authorization: Bearer $STRIP...KEY" \
-d name="$CUSTOMER_NAME" \
-d email="$CUSTOMER_EMAIL")
CUSTOMER_ID=$(echo "$CUSTOMER" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])")
# 3. Create payment link
LINK=$(curl -s https://api.stripe.com/v1/payment_links \
-H "Authorization: Bearer $STRIP...KEY" \
-d "line_items[0][price_data][currency]=usd" \
-d "line_items[0][price_data][unit_amount]=$AMOUNT" \
-d "line_items[0][price_data][product_data][name]=Service - Residential $SQFT sqft" \
-d "line_items[0][quantity]=1" \
-d "metadata[customer_id]=$CUSTOMER_ID" \
-d "metadata[sqft]=$SQFT" \
-d "metadata[region]=$REGION")
PAYMENT_URL=$(echo "$LINK" | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])")
echo "Payment link: $PAYMENT_URL"
Webhooks (for automated payment confirmation)
# Create webhook endpoint
curl -s https://api.stripe.com/v1/webhook_endpoints \
-H "Authorization: Bearer $STRIP...KEY" \
-d "url=https://yourdomain.com/webhook/stripe" \
-d "enabled_events[]=checkout.session.completed" \
-d "enabled_events[]=invoice.paid" \
-d "enabled_events[]=payment_intent.payment_failed"
Test Cards (for demo)
- Successful payment:
4242 4242 4242 4242(Visa) - Requires authentication:
4000 0027 6000 3184 - Declined payment:
4000 0000 0000 0002 - Any future date for expiry, any CVC, any ZIP
Common Pitfalls
- Amounts are in cents, not dollars: $2,500 = 250000, not 2500
- Test mode vs Live mode: Always verify you're using sk_test_ keys for demo
- Don't store customer card data: Never log full card numbers; Stripe handles PCI compliance
- Webhook signature verification: For production, verify Stripe-Signature header
- Rate limits: Stripe allows ~100 read/sec and ~100 write/sec per key
- Currency must be lowercase:
usdnotUSD - Price tiers from estimator: Match the estimator-engine output exactly to avoid billing errors
Verification Checklist
- STRIPE_SECRET_KEY set in environment
- Can create customer (test mode)
- Can create payment link and get URL
- Can create checkout session
- Can create and send invoice
- Can check payment status
- Test card payment succeeds with 4242 card
- Payment updates CRM record (integration with crm-lite)
- Invoice email reaches customer (integration with email skill)
| 1 | |
| 2 | name stripe-payments |
| 3 | description "Create Stripe checkout sessions, payment links, invoices, and customers via Stripe REST API. Use when processing payments, sending invoices, or managing customer billing for a service business." |
| 4 | version "1.0.0" |
| 5 | author Hermes Agent |
| 6 | license MIT |
| 7 | metadata |
| 8 | hermes |
| 9 | tags [stripe, payments, invoicing, checkout, small-business] |
| 10 | related_skills [lead-to-payment, crm-lite, estimator-engine, quickbooks-online] |
| 11 | |
| 12 | |
| 13 | # Stripe Payments Skill |
| 14 | |
| 15 | ## When to Use |
| 16 | Customer needs to pay for an estimate/job |
| 17 | Creating an invoice for a service |
| 18 | Setting up a customer in Stripe for recurring billing |
| 19 | Generating a payment link to send to a client |
| 20 | Checking payment status for a job |
| 21 | Agent needs to pay for its own SaaS subscriptions (hackathon "earn and spend" angle) |
| 22 | |
| 23 | ## Prerequisites |
| 24 | Stripe API key (secret key, starts with `sk_`) |
| 25 | Stripe account in test mode for demos |
| 26 | Stripe CLI installed for webhook testing (optional) |
| 27 | Environment variable: `STRIPE_SECRET_KEY` |
| 28 | |
| 29 | ## Setup |
| 30 | |
| 31 | ### 1. Get API Key |
| 32 | Log in to Stripe Dashboard (dashboard.stripe.com) |
| 33 | Toggle "Test mode" on (top right) |
| 34 | Developers > API Keys > Copy "Secret key" (sk_test_...) |
| 35 | |
| 36 | ### 2. Store Key in Hermes Environment |
| 37 | Add to `~/.hermes/.env`: |
| 38 | |
| 39 | STRIPE_SECRET_KEY=sk_tes...xxxx |
| 40 | |
| 41 | |
| 42 | ### 3. Stripe CLI (optional, for local webhooks) |
| 43 | |
| 44 | # Install |
| 45 | curl -sL https://github.com/stripe/stripe-cli/releases/latest/download/stripe_linux_x86_64.tar.gz | tar xz -C /usr/local/bin/ |
| 46 | stripe login |
| 47 | stripe listen --forward-to localhost:8642/v1/stripe/webhook |
| 48 | |
| 49 | |
| 50 | ## API Reference |
| 51 | |
| 52 | All Stripe API calls use `https://api.stripe.com/v1/` with Bearer auth. |
| 53 | |
| 54 | ### Create Customer |
| 55 | |
| 56 | curl -s https://api.stripe.com/v1/customers \ |
| 57 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 58 | -d name="John Smith" \ |
| 59 | -d email="[email protected]" \ |
| 60 | -d phone="555-555-1234" \ |
| 61 | -d "metadata[business]=[BUSINESS_NAME]" \ |
| 62 | -d "metadata[source]=Referral" \ |
| 63 | -d "metadata[address]=123 Main St, [CITY], [STATE]" |
| 64 | |
| 65 | |
| 66 | ### Create Payment Link (simplest for demo) |
| 67 | |
| 68 | curl -s https://api.stripe.com/v1/payment_links \ |
| 69 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 70 | -d "line_items[0][price_data][currency]=usd" \ |
| 71 | -d "line_items[0][price_data][unit_amount]=250000" \ |
| 72 | -d "line_items[0][price_data][product_data][name]=Service - Residential 2000sqft" \ |
| 73 | -d "line_items[0][quantity]=1" \ |
| 74 | -d "metadata[customer_name]=John Smith" \ |
| 75 | -d "metadata[service_type]=Residential" \ |
| 76 | -d "metadata[sqft]=2000" |
| 77 | |
| 78 | Returns a URL like `https://buy.stripe.com/...` you can send to the customer. |
| 79 | |
| 80 | ### Create Checkout Session (more control) |
| 81 | |
| 82 | curl -s https://api.stripe.com/v1/checkout/sessions \ |
| 83 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 84 | -d mode=payment \ |
| 85 | -d "success_url=https://yourdomain.com/success" \ |
| 86 | -d "cancel_url=https://yourdomain.com/cancel" \ |
| 87 | -d "[email protected]" \ |
| 88 | -d "line_items[0][price_data][currency]=usd" \ |
| 89 | -d "line_items[0][price_data][unit_amount]=250000" \ |
| 90 | -d "line_items[0][price_data][product_data][name]=Service - Residential" \ |
| 91 | -d "line_items[0][quantity]=1" \ |
| 92 | -d "metadata[job_id]=JOB-0001-001" \ |
| 93 | -d "metadata[estimate_amount]=2500" |
| 94 | |
| 95 | Unit amount is in cents: $2,500.00 = 250000. |
| 96 | |
| 97 | ### Create Invoice (for NET-30 billing) |
| 98 | |
| 99 | # Step 1: Create invoice |
| 100 | INVOICE=$(curl -s https://api.stripe.com/v1/invoices \ |
| 101 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 102 | -d customer=$CUSTOMER_ID \ |
| 103 | -d "description=Service - Residential") |
| 104 | INVOICE_ID=$(echo "$INVOICE" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") |
| 105 | |
| 106 | # Step 2: Add line item |
| 107 | curl -s https://api.stripe.com/v1/invoiceitems \ |
| 108 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 109 | -d customer=$CUSTOMER_ID \ |
| 110 | -d invoice=$INVOICE_ID \ |
| 111 | -d amount=250000 \ |
| 112 | -d currency=usd \ |
| 113 | -d "description=Service - Residential 2000sqft - Standard Region" |
| 114 | |
| 115 | # Step 3: Finalize and send |
| 116 | curl -s https://api.stripe.com/v1/invoices/$INVOICE_ID/finalize \ |
| 117 | -H "Authorization: Bearer $STRIP...KEY" |
| 118 | curl -s https://api.stripe.com/v1/invoices/$INVOICE_ID/send \ |
| 119 | -H "Authorization: Bearer $STRIP...KEY" |
| 120 | |
| 121 | |
| 122 | ### Check Payment Status |
| 123 | |
| 124 | curl -s https://api.stripe.com/v1/checkout/sessions/$SESSION_ID \ |
| 125 | -H "Authorization: Bearer $STRIP...KEY" | python3 -m json.tool |
| 126 | # Look for "payment_status": "paid" |
| 127 | |
| 128 | |
| 129 | ### List All Payments |
| 130 | |
| 131 | curl -s "https://api.stripe.com/v1/payment_intents?limit=10" \ |
| 132 | -H "Authorization: Bearer $STRIP...KEY" | python3 -m json.tool |
| 133 | |
| 134 | |
| 135 | ### Refund (if needed) |
| 136 | |
| 137 | curl -s https://api.stripe.com/v1/refunds \ |
| 138 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 139 | -d payment_intent=$PI_ID \ |
| 140 | -d amount=250000 # partial refund amount in cents, omit for full |
| 141 | |
| 142 | |
| 143 | ## Integration Patterns |
| 144 | |
| 145 | ### Pattern 1: Estimate -> Payment Link (Quick Pay) |
| 146 | Agent runs estimator-engine skill to calculate price |
| 147 | Agent creates Stripe payment link for that amount |
| 148 | Agent stores payment link URL in CRM (crm-lite) |
| 149 | Agent emails link to customer via email skill |
| 150 | Agent monitors payment status and updates CRM when paid |
| 151 | |
| 152 | ### Pattern 2: Invoice -> Email -> Track (NET-30) |
| 153 | Agent creates Stripe customer |
| 154 | Agent creates invoice with line items |
| 155 | Agent finalizes and sends invoice (Stripe emails customer) |
| 156 | Agent logs invoice ID in CRM |
| 157 | Agent checks payment status daily via cron job |
| 158 | |
| 159 | ### Pattern 3: Agent Pays for Its Own SaaS (Hackathon Angle) |
| 160 | Agent has Stripe Connected Account |
| 161 | Agent creates payment link for a service |
| 162 | Customer pays -> funds land in business Stripe account |
| 163 | Agent uses Stripe to pay for Base44, Mailchimp, or other SaaS |
| 164 | Demonstrates "agent that earns and spends real money" |
| 165 | |
| 166 | ## Quick Start: Full Estimate-to-Payment Flow |
| 167 | |
| 168 | |
| 169 | # 1. Get customer info from CRM |
| 170 | CUSTOMER_NAME="John Smith" |
| 171 | CUSTOMER_EMAIL="[email protected]" |
| 172 | SQFT=2000 |
| 173 | REGION="Standard" |
| 174 | # Price from estimator: 2000sf * $1.40/sf = $2,800 (example — use your configured rates) |
| 175 | AMOUNT=280000 # $2,800.00 in cents |
| 176 | |
| 177 | # 2. Create Stripe customer |
| 178 | CUSTOMER=$(curl -s https://api.stripe.com/v1/customers \ |
| 179 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 180 | -d name="$CUSTOMER_NAME" \ |
| 181 | -d email="$CUSTOMER_EMAIL") |
| 182 | CUSTOMER_ID=$(echo "$CUSTOMER" | python3 -c "import sys,json; print(json.load(sys.stdin)['id'])") |
| 183 | |
| 184 | # 3. Create payment link |
| 185 | LINK=$(curl -s https://api.stripe.com/v1/payment_links \ |
| 186 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 187 | -d "line_items[0][price_data][currency]=usd" \ |
| 188 | -d "line_items[0][price_data][unit_amount]=$AMOUNT" \ |
| 189 | -d "line_items[0][price_data][product_data][name]=Service - Residential $SQFT sqft" \ |
| 190 | -d "line_items[0][quantity]=1" \ |
| 191 | -d "metadata[customer_id]=$CUSTOMER_ID" \ |
| 192 | -d "metadata[sqft]=$SQFT" \ |
| 193 | -d "metadata[region]=$REGION") |
| 194 | PAYMENT_URL=$(echo "$LINK" | python3 -c "import sys,json; print(json.load(sys.stdin)['url'])") |
| 195 | |
| 196 | echo "Payment link: $PAYMENT_URL" |
| 197 | |
| 198 | |
| 199 | ## Webhooks (for automated payment confirmation) |
| 200 | |
| 201 | # Create webhook endpoint |
| 202 | curl -s https://api.stripe.com/v1/webhook_endpoints \ |
| 203 | -H "Authorization: Bearer $STRIP...KEY" \ |
| 204 | -d "url=https://yourdomain.com/webhook/stripe" \ |
| 205 | -d "enabled_events[]=checkout.session.completed" \ |
| 206 | -d "enabled_events[]=invoice.paid" \ |
| 207 | -d "enabled_events[]=payment_intent.payment_failed" |
| 208 | |
| 209 | |
| 210 | ## Test Cards (for demo) |
| 211 | Successful payment: `4242 4242 4242 4242` (Visa) |
| 212 | Requires authentication: `4000 0027 6000 3184` |
| 213 | Declined payment: `4000 0000 0000 0002` |
| 214 | Any future date for expiry, any CVC, any ZIP |
| 215 | |
| 216 | ## Common Pitfalls |
| 217 | **Amounts are in cents, not dollars**: $2,500 = 250000, not 2500 |
| 218 | **Test mode vs Live mode**: Always verify you're using sk_test_ keys for demo |
| 219 | **Don't store customer card data**: Never log full card numbers; Stripe handles PCI compliance |
| 220 | **Webhook signature verification**: For production, verify Stripe-Signature header |
| 221 | **Rate limits**: Stripe allows ~100 read/sec and ~100 write/sec per key |
| 222 | **Currency must be lowercase**: `usd` not `USD` |
| 223 | **Price tiers from estimator**: Match the estimator-engine output exactly to avoid billing errors |
| 224 | |
| 225 | ## Verification Checklist |
| 226 | [ ] STRIPE_SECRET_KEY set in environment |
| 227 | [ ] Can create customer (test mode) |
| 228 | [ ] Can create payment link and get URL |
| 229 | [ ] Can create checkout session |
| 230 | [ ] Can create and send invoice |
| 231 | [ ] Can check payment status |
| 232 | [ ] Test card payment succeeds with 4242 card |
| 233 | [ ] Payment updates CRM record (integration with crm-lite) |
| 234 | [ ] Invoice email reaches customer (integration with email skill) |
Details
- Version
- 1.0.0
- License
- MIT
- Stars on the repo
- ★ 122
- Checked
- Source
- hewi333/Mom-n-Pop-Skills ↗
- Creator
- hewi333 · 12 listings
Similar skills
See all →
SkillAPI Interface Design
AgentVersion-Specific Docs Lookup
SkillAdaptyv Bio Foundry API
Skill.NET Backend Developer
SkillGemini Agent API Guide
SkillGemini Notebook AutomationMore from hewi333
SkillConstruction Project Manager
SkillLightweight SQLite CRM
SkillService Pricing Calculator
SkillBusiness Financial Analyzer
SkillLead-to-Payment Pipeline
SkillMailchimp Integration Agent