| name | stripe-setup |
| description | Auto-configure Stripe webhooks for affiliate sale tracking via CLI OAuth flow. Triggers on "stripe setup", "webhook setup", "stripe integration". |
| license | MIT |
| metadata | {"author":"affitor","version":"1.0.0","organization":"Affitor"} |
Stripe Auto-Setup
Connect your Stripe account to Affitor with a single command. Automatically configures webhooks for payment tracking.
Quick Setup
npx affitor setup stripe
This command:
- Opens your browser to authorize Stripe Connect (read-only access)
- Creates a webhook endpoint on your Stripe account pointing to Affitor
- Subscribes to the required payment events
- Saves the connection to your Affitor program
What Gets Configured
The CLI creates a webhook endpoint that listens for:
| Event | Purpose |
|---|
customer.created | New customer attribution |
checkout.session.completed | One-time payment tracking |
invoice.paid | Subscription payment tracking |
invoice.payment_failed | Failed payment handling |
charge.refunded | Refund processing |
customer.subscription.deleted | Churn tracking |
Prerequisites
- Run
npx affitor init first (creates your program)
- Have a Stripe account with API access
.affitor/config.json must exist in your project
After Setup
Verify the connection:
npx affitor status
Test a sale event:
npx affitor test sale
You can also verify in your Stripe Dashboard under Developers → Webhooks — you should see the Affitor endpoint listed.
Manual Alternative
If you prefer not to use OAuth, you can add Stripe metadata manually instead. See the sale-tracking skill for the metadata approach.