Skip to content
Back to skills

Stripe

ASecurity

Stripe provides APIs for payment processing, billing, subscriptions, and financial management. This skill focuses on the Stripe Node.js and Python SDKs, emphasizing PCI-compliant flows like Checkout Sessions and Webhook signatures.

  • 13 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 5, 2026
ai-agentspythonbashnodeexpressapibackendsecurity

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 8 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add ashish7802/awesome-api-skills --skill stripe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Stripe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Stripe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-stripe/badge)](https://www.skillsdirectory.com/skills/ashish7802-stripe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Stripe API Skill

## Overview
Stripe provides APIs for payment processing, billing, subscriptions, and financial management. This skill focuses on the Stripe Node.js and Python SDKs, emphasizing PCI-compliant flows like Checkout Sessions and Webhook signatures.

## Installation
```bash
npm install stripe
pip install stripe
```

## Authentication
Stripe uses Bearer token authentication via secret keys (e.g., `sk_test_...` or `sk_live_...`). Never expose the secret key in client-side code. Use restricted keys with minimal scope where possible.

## Core Concepts
- **PaymentIntent**: Tracks the lifecycle of a customer checkout process.
- **Checkout Session**: A hosted Stripe page for secure payment collection.
- **Webhook**: Asynchronous HTTP callbacks for events like `payment_intent.succeeded`.

## Common Workflows
1. Create a Checkout Session on the backend.
2. Redirect the user to the `url` returned.
3. Handle the `checkout.session.completed` event via Webhook.

## Error Handling
Stripe returns standard HTTP status codes. Inspect the `StripeError` object for `type` (e.g., `card_error`, `api_error`) and `code` (e.g., `insufficient_funds`). Implement exponential backoff for `429 Too Many Requests`.

## Security
Always verify webhook signatures using `stripe.webhooks.constructEvent` to prevent replay attacks and spoofing. Ensure TLS is enforced for all API traffic.

## Rate Limits
Standard API rate limits are 100 read/write operations per second in live mode. Test mode is limited to 25 operations per second.

## Best Practices
Use idempotency keys (`Idempotency-Key` header) for all POST requests to safely retry network failures without duplicate charges.

## Troubleshooting
If a webhook fails signature validation, ensure you are using the raw body buffer (in Express, use `express.raw({type: 'application/json'})`) rather than a parsed JSON body.

## References
- [API Reference](https://stripe.com/docs/api)

## Why use this skill
Use this when your agent works with **stripe** — structured patterns beat pasted docs and prevent common hallucinations.

## AI pitfalls
- Inventing webhook event names not in the vendor catalog
- Using secret keys in client-side or browser code
- Skipping signature verification on webhook payloads

## Production checklist
- [ ] Webhook signatures verified on raw request body
- [ ] Idempotency keys on mutating requests
- [ ] Test and live keys isolated by environment

## Related skills
- No graph relationships yet — see the knowledge graph in the docs site.

---
> **Last Verified:** 2026-07-02

Files in this skill

  • SKILL.md2.5 KB
  • examples/basic.ts39 B
  • examples/example.py44 B
  • examples/example.ts87 B
  • prompts/create-checkout.md147 B
  • prompts/system.md41 B
  • tests/skill.test.ts29 B
  • tests/validation.test.ts104 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.