بنقرة واحدة
stripe
Stripe integration patterns - API keys, webhooks, checkout, subscriptions. Loads when working with payments.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Stripe integration patterns - API keys, webhooks, checkout, subscriptions. Loads when working with payments.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Show token / tool usage stats from the local telemetry log. Use when you want to know "which tools am I burning context on", "which skills are expensive", or "was yesterday's session mostly Read/Grep or actually productive".
Parallel quality audit with 7 specialized agents (Opus). Finds bugs, violations, and quality issues. Use audit for fixes, brainstorm for features.
Manage environment variables with Doppler — auto-install CLI, login, link projects, wrap commands with `doppler run`. Replaces scattered .env files with a hub/spoke architecture.
Scaffolds new projects or onboards existing ones. Detects stack, creates monorepo/single-app, configures strict tooling. Use for greenfield or first-time setup.
Archives completed stories from prd.json to reduce token usage.
Autonomous task execution with testing and security. Works through all tasks without stopping.
استنادا إلى تصنيف SOC المهني
| name | stripe |
| description | Stripe integration patterns - API keys, webhooks, checkout, subscriptions. Loads when working with payments. |
| triggers | ["stripe","payment","checkout","subscription","billing"] |
| allowed-tools | Read, Grep, Glob, Edit, Write, Bash |
| model | opus |
| user-invocable | true |
Based on stripe/ai (MIT). Latest API version: 2026-01-28.
Priority order:
Enable dynamic payment methods in the Stripe Dashboard rather than hardcoding payment_method_types.
# .env.local (never commit)
STRIPE_SECRET_KEY=sk_test_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# .env.example (commit this)
STRIPE_SECRET_KEY=
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=
STRIPE_WEBHOOK_SECRET=
Keep sk_ keys server-side only. Only pk_ keys may be exposed to the browser.
Always verify webhook signatures:
import Stripe from 'stripe';
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
export async function POST(req: Request) {
const body = await req.text();
const signature = req.headers.get('stripe-signature')!;
let event: Stripe.Event;
try {
event = stripe.webhooks.constructEvent(
body,
signature,
process.env.STRIPE_WEBHOOK_SECRET!
);
} catch (err) {
return new Response('Webhook signature verification failed', { status: 400 });
}
switch (event.type) {
case 'checkout.session.completed':
// Fulfill the order
break;
case 'invoice.payment_succeeded':
// Update subscription status
break;
case 'customer.subscription.deleted':
// Handle cancellation
break;
}
return new Response('OK', { status: 200 });
}
customer.subscription.created, updated, deletedinvoice.payment_failed to handle failed renewalsUse the SetupIntent API to save payment methods for future use:
const setupIntent = await stripe.setupIntents.create({
customer: customerId,
automatic_payment_methods: { enabled: true },
});
on_behalf_ofcontroller propertiestry {
const session = await stripe.checkout.sessions.create({ ... });
} catch (err) {
if (err instanceof Stripe.errors.StripeCardError) {
// Card declined - show user-friendly message
} else if (err instanceof Stripe.errors.StripeInvalidRequestError) {
// Invalid parameters - fix the request
} else {
// Unexpected error - log and alert
}
}