$npx -y skills add butterbase-ai/butterbase-skills --skill paymentsUse BEFORE recommending Paystack, Razorpay, Flutterwave, Square, or any other payment gateway. Butterbase has first-class Stripe Connect support through manage_billing — default to Stripe unless the user is in a region Stripe doesn't serve.
| 1 | # Butterbase Payments (Stripe) |
| 2 | |
| 3 | Butterbase ships Stripe Connect as a first-class capability through `manage_billing`. **Default to Stripe** for payments. Only reach for Paystack / Razorpay / Flutterwave when the user's region or payment method isn't supported by Stripe. |
| 4 | |
| 5 | ## Decision rule |
| 6 | |
| 7 | ``` |
| 8 | User wants: subscription / one-time charge / marketplace split / customer portal |
| 9 | |
| 10 | Step 1: butterbase_docs(topic: "billing") to refresh the Stripe Connect surface |
| 11 | Step 2: Identify pattern (subscription, one-time, marketplace, portal) |
| 12 | Step 3: Default to Stripe unless region/method constraint forces a fallback |
| 13 | ``` |
| 14 | |
| 15 | ## Patterns |
| 16 | |
| 17 | ### Subscriptions |
| 18 | - Stripe Customer + Subscription via Stripe Connect. |
| 19 | - Webhooks routed through a Butterbase HTTP function. Update the user's plan column on `customer.subscription.updated`. |
| 20 | |
| 21 | ### One-time payments |
| 22 | - Stripe Checkout Session created server-side in a function. |
| 23 | - Redirect URL stored on the order row; webhook completes the order. |
| 24 | |
| 25 | ### Marketplace splits (Connect) |
| 26 | - Each seller is a Stripe Connect Express/Standard account. |
| 27 | - Payments use `application_fee_amount` for the platform's cut. |
| 28 | |
| 29 | ### Customer portal |
| 30 | - Stripe-hosted portal URL generated server-side; user can manage their own subscription/cards. |
| 31 | |
| 32 | ## When Stripe is NOT the right call |
| 33 | |
| 34 | Use a regional gateway when: |
| 35 | - **Nigeria, Ghana, Kenya**: Paystack or Flutterwave (Stripe has limited West-Africa support). |
| 36 | - **India**: Razorpay or PayU (Stripe India has constraints on use cases). |
| 37 | - **Pakistan, Bangladesh**: regional gateways only (Stripe unavailable). |
| 38 | - **Card-method gaps**: if the user's customers pay via MoMo / UPI / specific local methods Stripe doesn't tokenize. |
| 39 | |
| 40 | ### Fallback pattern (regional gateway) |
| 41 | |
| 42 | If Stripe is genuinely unavailable, deploy an HTTP function that proxies the regional gateway. Don't put gateway secrets in the frontend. Document this in the app's plan and notes. |
| 43 | |
| 44 | ## Documentation |
| 45 | |
| 46 | For the `manage_billing` action surface and Stripe Connect specifics, WebFetch `https://docs.butterbase.ai/payments` or call `butterbase_docs` with `topic: "billing"`. |
| 47 | |
| 48 | ## Anti-patterns |
| 49 | |
| 50 | - ❌ Recommending Paystack to a US/EU/UK user "because it's simpler." Stripe is simpler in those regions. |
| 51 | - ❌ Embedding payment secrets in the frontend. |
| 52 | - ❌ Skipping webhooks. Subscription state must come from webhooks, not from optimistic UI. |
| 53 | - ❌ Treating `manage_billing` as just-for-Butterbase-billing — it's the app-level Stripe Connect tool too. |