一键导入
stripe-webhook-testing
Set up Stripe CLI to forward webhooks to local development server for testing Stripe integrations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Set up Stripe CLI to forward webhooks to local development server for testing Stripe integrations
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Quickly commit, push, and create a PR while leaving validation to GitHub checks
Quickly commit and push local changes while leaving validation to GitHub checks
Step-by-step guide for adding new pages to the Yew frontend
Step-by-step guide for adding new OAuth integrations to Lightfriend
Step-by-step guide for modifying database schema using Diesel migrations
Run formatting and linting checks on the codebase
| name | stripe-webhook-testing |
| description | Set up Stripe CLI to forward webhooks to local development server for testing Stripe integrations |
This skill should be used when the user wants to test Stripe webhooks locally during development.
brew install stripe/stripe-cli/stripe on macOS).envThe backend must have a webhook endpoint at /api/stripe/webhook. Verify this in:
backend/src/main.rs - route definitionbackend/src/handlers/stripe_handlers.rs - handler implementationEnsure the backend is running:
cd backend && cargo run
The server must be running before starting Stripe CLI forwarding.
Run the following command to forward webhooks to localhost:
stripe listen --forward-to localhost:3000/api/stripe/webhook
The CLI will output a webhook secret starting with whsec_....
STRIPE_WEBHOOK_SECRET in backend/.env:
STRIPE_WEBHOOK_SECRET=whsec_xxxxxxxxxxxxxxxxxxxx
Use Stripe CLI to trigger test webhook events:
# Subscription events
stripe trigger customer.subscription.created
stripe trigger customer.subscription.updated
stripe trigger customer.subscription.deleted
# Checkout events
stripe trigger checkout.session.completed
# Invoice events
stripe trigger invoice.paid
stripe trigger invoice.payment_failed
Check backend console output for:
The backend currently handles:
customer.subscription.created - New subscription activatedcustomer.subscription.updated - Subscription modifiedcustomer.subscription.deleted - Subscription cancelledcheckout.session.completed - Checkout completedSTRIPE_WEBHOOK_SECRET matches the secret from stripe listenstripe listen first, then trigger events in a new terminal