agentleFS
Ghost7802Ghost7802/awesome-api-skills/skills/stripe/SKILL.md

stripe

Skill13 starsChanged 27 days agoMITView on GitHub

  • Installs packages

23 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use hubspot.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • refly-aiSkill

    hubspot

    Integrate with HubSpot for CRM management. Use when you need to: (1) manage contacts and deals, (2) track sales pipelines, or (3) automate marketing and CRM workflows.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Create a Checkout Session on the backend.

    line 21
  2. Very specific:

    Always verify webhook signatures using stripe.webhooks.constructEvent to prevent replay attacks and spoofing.

    line 29
  3. Very specific:

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

    line 35
  4. Very specific:

    If a webhook fails signature validation, ensure you are using the raw body buffer (in Express, use express.raw({type: 'application/json'})) …

    line 38
  5. Distinctive:

    Use this when your agent works with stripe — structured patterns beat pasted docs and prevent common hallucinations.

    line 44

“Common” is measured: kept by at least 6 in 10 of the 18 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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

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

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

  • resend — works well with
  • clerk — works well with
  • paddle — alternative to

Last Verified: 2026-07-02

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.