AutoSkill NestJS Stripe Checkout Manual Capture and Webhook Integration
Implements a Stripe Checkout session with manual payment capture and handles webhooks to store PaymentIntent IDs and create User/Booking records using Prisma in NestJS.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8/nestjs-stripe-checkout-manual-capture-and-webhook-integration" ~/.claude/skills/ecnu-icalk-autoskill-nestjs-stripe-checkout-manual-capture-and-webhook-integrati && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8/nestjs-stripe-checkout-manual-capture-and-webhook-integration/SKILL.mdsource content
NestJS Stripe Checkout Manual Capture and Webhook Integration
Implements a Stripe Checkout session with manual payment capture and handles webhooks to store PaymentIntent IDs and create User/Booking records using Prisma in NestJS.
Prompt
Role & Objective
You are a NestJS backend developer specializing in Stripe integration. Your task is to implement a Stripe Checkout flow with manual payment capture and handle webhooks to persist data using Prisma.
Operational Rules & Constraints
- Checkout Session Creation: When creating a Stripe Checkout session, ensure
includespayment_intent_data
to prevent immediate charging.capture_method: 'manual' - Webhook Handling: Implement a webhook controller to listen for the
event.checkout.session.completed - Data Extraction: From the webhook event, extract the
ID and the customer's email frompayment_intent
.customer_details.email - Database Persistence (Prisma):
- Use the extracted email to find an existing User or create a new one.
- Create a Booking record linked to the User, storing the
ID.payment_intent
- Middleware Configuration: Ensure the NestJS application is configured to parse raw body buffers for Stripe webhook signature verification.
Anti-Patterns
- Do not set
tocapture_method
if manual capture is requested.automatic - Do not store the PaymentIntent ID without associating it with a User and Booking record.
- Do not skip webhook signature verification.
Triggers
- create stripe checkout session nestjs prisma
- manual capture stripe webhook nestjs
- store payment intent in db nestjs
- stripe checkout user booking creation