Stripe + Brevo انٹیگریشن
Stripe + Brevo
Stripe کے ادائیگی ڈیٹا کو Brevo کی انگیجمنٹ لیئر سے جوڑیں۔ ہر ادائیگی واقعہ, سبسکرپشن بنائی گئی، ادائیگی ناکام، رقم واپس کی گئی, ہدف پیغامات کے لیے ایک محرک بن جاتا ہے۔
استعمال کردہ MCP سرورز
| سرور | پیکیج | تصدیق | مقصد |
|---|---|---|---|
| Stripe MCP | @stripe/mcp | API کلید | ادائیگیاں، سبسکرپشنز، گاہکین، انوائس، پروڈکٹ، علمی بنیاد |
| Brevo MCP | mcp.brevo.com/v1/brevo/mcp | ٹوکن | رابطے، ای میل، SMS، WhatsApp، مہمات، ایونٹ ٹریکنگ |
سیٹ اپ
مرحلہ 1: دونوں MCP سرورز جوڑیں
{ "mcpServers": { "stripe": { "command": "npx", "args": ["-y", "@stripe/mcp"], "env": { "STRIPE_SECRET_KEY": "sk_live_your-stripe-key" } }, "brevo": { "command": "npx", "args": [ "mcp-remote", "https://mcp.brevo.com/v1/brevo/mcp", "--header", "Authorization: Bearer ${BREVO_MCP_TOKEN}" ], "env": { "BREVO_MCP_TOKEN": "your-brevo-mcp-token" } } }}مرحلہ 2: تصدیق کریں
> اس ہفتے بنائی گئی Stripe سبسکرپشنز دکھائیں> میری Brevo ای میل ٹیمپلیٹس کی فہرست بنائیںاستعمال کا معاملہ 1: ادائیگی ایونٹ مہم ایجنٹ
Stripe ایونٹس کو Brevo انگیجمنٹ سے منسوب کریں:
---name: stripe-payment-campaignsdescription: Trigger Brevo campaigns from Stripe payment eventsversion: 1.0.0temperature: 0.2tools: - stripe - brevo_contacts - brevo_email_campaign_management - brevo_templates - brevo_sms_campaignstriggers: - event: payment_intent.succeeded - event: invoice.payment_failed - event: customer.subscription.created - event: customer.subscription.deleted - event: charge.refunded---
# Payment Event Campaign Agent
Listen for Stripe payment events and trigger the appropriateBrevo engagement campaign.
## Event-to-Campaign Mapping
| Stripe Event | Brevo Action | Timing ||-------------|-------------|--------|| `payment_intent.succeeded` | Send receipt + thank you email | Immediate || `invoice.payment_failed` | Send payment failed email + SMS | Immediate || `invoice.payment_failed` (2nd attempt) | Send urgent SMS with update link | +24h || `customer.subscription.created` | Welcome sequence (3 emails over 7 days) | Immediate || `customer.subscription.updated` | Plan change confirmation email | Immediate || `customer.subscription.deleted` | Cancellation survey + win-back sequence | Immediate + 7 days || `charge.refunded` | Refund confirmation + feedback request | Immediate || `invoice.upcoming` | Renewal reminder with usage summary | 3 days before |
## Failed Payment Recovery
Critical revenue recovery flow:
1. **Attempt 1 fails**: Email with "Update payment method" CTA2. **+24 hours**: SMS with direct link to billing portal3. **+72 hours**: Email from founder: "We don't want to lose you"4. **+7 days (final)**: Last chance email with grace period deadline
## Rules- ALWAYS sync Stripe customer email to Brevo before sending- NEVER expose full payment details in emails (last 4 digits only)- Track events: stripe_payment_email_sent, stripe_recovery_success- For failed payments, stop sequence immediately if payment succeedsاستعمال کا معاملہ 2: سبسکرپشن لائف سائیکل ایجنٹ
سائن اپ سے تجدید تک مکمل سبسکرپشن سفر کو منظم کریں:
---name: stripe-subscription-lifecycledescription: Manage subscription engagement from signup through renewalversion: 1.0.0temperature: 0.3tools: - stripe - brevo_contacts - brevo_email_campaign_management - brevo_segments - brevo_templatestriggers: - schedule: "0 8 * * *"---
# Subscription Lifecycle Agent
Daily check of subscription states to drive engagement:
## Daily Tasks
1. **New subscriptions (last 24h)** - Create/update Brevo contact with plan details - Add to plan-specific segment - Trigger onboarding sequence
2. **Renewals coming (next 7 days)** - Send renewal reminder with usage summary - For annual plans: send "year in review" email
3. **Trials expiring (next 3 days)** - Send trial-to-paid conversion email - SMS reminder on last day
4. **Recently churned (last 7 days)** - Add to win-back segment - Schedule win-back sequence (day 7, 14, 30)
## Brevo Attributes from Stripe
| Stripe Data | Brevo Attribute ||------------|-----------------|| subscription.plan.name | PLAN_NAME || subscription.current_period_end | RENEWAL_DATE || subscription.status | SUBSCRIPTION_STATUS || customer.currency | CURRENCY || invoice.amount_paid (sum) | LIFETIME_REVENUE || subscription.created | SUBSCRIPTION_START |
## Rules- ALWAYS use customer's currency when displaying amounts- Segment by plan tier for differentiated messaging- Track MRR impact of each campaign for ROI reportingمثال: حقیقی وقت میں ترتیب
آپ: "میں دیکھ رہا ہوں کہ آج ہمارے 5 ناکام ادائیگیاں ہوئیں۔ جانچیں کہ کون سی سبسکرپشن گاہکین کی ہیں اور ریکوری سیکوینس شروع کریں۔"
Claude: آج Stripe میں ناکام ادائیگیاں چیک کر رہے ہیں...[حالیہ ناکام انوائس کی فہرست بنانے کے لیے stripe MCP استعمال کرتا ہے]
5 ناکام ادائیگیاں ملیں:- 3 سبسکرپشن گاہکین (ماہانہ پلانز)- 2 ایک وقتی ادائیگیاں
3 سبسکرپشن گاہکین کے لیے:[رابطوں کی تصدیق کے لیے brevo_contacts استعمال کرتا ہے][ناکام ادائیگی ای میل بھیجنے کے لیے brevo_email_campaign_management استعمال کرتا ہے][+24 گھنٹے SMS فالو اپ کے لیے brevo_sms_campaigns استعمال کرتا ہے]
3 گاہکین کے لیے ریکوری سیکوینس شروع:- [email protected], Pro پلان ($49/ماہ), ای میل بھیجی گئی- [email protected], Business پلان ($99/ماہ), ای میل بھیجی گئی- [email protected], Pro پلان ($49/ماہ), ای میل بھیجی گئی- اگر حل نہ ہو تو کل کے لیے SMS فالو اپ شیڈول کیے گئےاگلے اقدامات
- Shopify + Brevo, ای کامرس انٹیگریشن
- HubSpot + Brevo, CRM انٹیگریشن
- کسٹم API + Brevo, اپنا کنیکٹر بنائیں