Skip to main content

Stripe Integration Template

Integrate Stripe payment processing into your Mid-call Actions and enable your AI assistant to initiate payments, create Payment Intents, and start subscription checkouts during customer conversations.

Overview & Features

Payment Intent Management

  • Immediate payment preparation during the call
  • Support for one-time payments and subscriptions
  • Multi-currency support (EUR, USD, GBP, etc.)
  • PCI-DSS-compliant payment processing

Customer & Order Integration

  • Automatic customer ID linking
  • Order metadata for business intelligence
  • Integration with existing e-commerce systems
  • Webhook-based payment status updates

Stripe Account & API Setup

1. Prepare Stripe Dashboard

1

Set up Stripe Account

  • Register at Stripe or log in
  • Complete your business profile for live payments
  • Enable relevant payment methods (cards, SEPA, etc.)
2

Retrieve API Keys

API Keys Location:
  1. Stripe Dashboard → "Developers" → "API keys"
  2. Two key types available:
     - Publishable Key (pk_test_ or pk_live_)
     - Secret Key (sk_test_ or sk_live_)
  
Required for Mid-call Actions:
  - Secret Key (for server-to-server API calls)
  - Test environment: sk_test_...
  - Production: sk_live_...
3

Configure Webhooks

Webhook Setup for Payment Updates:
  1. "Developers" → "Webhooks" → "Add endpoint"
  2. Endpoint URL: https://your-app.com/stripe-webhook
  3. Events to send:
     - payment_intent.succeeded
     - payment_intent.payment_failed
     - payment_intent.canceled
  4. Note webhook secret for verification
4

Prepare Customer Management

  • Identify existing customers in Stripe
  • Map customer IDs to internal CRM systems
  • Review default payment methods and billing details

Configure Payment Intent Tool

Famulor Interface Configuration

FieldValue
Name *Stripe Zahlung initiieren
Description”Creates a Payment Intent in Stripe for secure payment processing during customer calls”
Function Name *create_stripe_payment
Function Description *“Creates a Payment Intent for a payment. Use this when a customer is ready to pay or make a deposit.”
HTTP MethodPOST
Timeout (ms)5000
Endpoint *https://api.stripe.com/v1/payment_intents

Parameter Schema

{
  "type": "object",
  "properties": {
    "amount": {
      "type": "integer",
      "description": "Amount in the smallest currency unit (e.g. 5000 for €50.00)",
      "minimum": 50,
      "maximum": 9999999
    },
    "currency": {
      "type": "string",
      "enum": ["eur", "usd", "gbp", "chf", "dkk", "nok", "sek"],
      "description": "Currency code (ISO 4217)",
      "default": "eur"
    },
    "customer_id": {
      "type": "string",
      "description": "Stripe Customer ID (if available, e.g. 'cus_abc123')"
    },
    "description": {
      "type": "string",
      "description": "Payment description (appears on credit card statements)",
      "examples": ["Invoice INV-2024-001", "Project XY deposit", "Subscription Premium Plan"]
    },
    "order_id": {
      "type": "string",
      "description": "Your internal order or invoice ID"
    },
    "customer_phone": {
      "type": "string",
      "description": "Customer phone number (for metadata)"
    },
    "customer_email": {
      "type": "string",
      "format": "email",
      "description": "Customer email address (for receipt and follow-up)"
    },
    "payment_type": {
      "type": "string",
      "enum": ["one_time", "subscription", "installment"],
      "description": "Type of payment",
      "default": "one_time"
    }
  },
  "required": ["amount", "currency", "description"]
}

Practical Use Cases

Scenario 1: Immediate Deposit During Sales Call

1

Detect Payment Readiness

Sales Conversation:
  Customer: "The offer sounds good. How can I pay the deposit?"
  
AI Assistant: "Great! I am preparing the payment for €5,000..."

→ create_stripe_payment is triggered
2

Payment Intent Creation

Stripe API Call:
  amount: 500000  # €5,000 in cents
  currency: "eur"
  description: "Deposit Project CRM Integration"
  customer_id: "cus_abc123def456"  # If known
  order_id: "ORD-2024-001"
  
Stripe Response:
  payment_intent_id: "pi_abc123def456ghi789"
  client_secret: "pi_abc123def456ghi789_secret_xyz"
  status: "requires_payment_method"
3

Payment Link Delivery

AI Integration:
  "The payment has been prepared. I will send you a secure payment link via email shortly.  
   The amount is €5,000 for the deposit on your CRM integration project."

Follow-up Actions:
  - Email with Stripe-hosted checkout link  
  - SMS with payment link as fallback  
  - CRM update: Payment Intent created  
  - Sales team notification  

Scenario 2: Subscription Upgrade

Subscription Management:
Support Context:
  Customer: "I need more features. Can we upgrade immediately?"
  
Payment Intent for Subscription:
  amount: 9900  # €99/month
  currency: "eur"
  description: "Upgrade to Professional Plan"
  metadata: {
    "subscription_type": "professional",
    "billing_cycle": "monthly",
    "upgrade_from": "basic",
    "effective_date": "2024-01-15"
  }

Integration Workflow:
  1. Create Payment Intent  
  2. Move customer to premium subscription group  
  3. Activate feature flags after successful payment  
  4. Update billing system  
Installment payments for large projects:
Enterprise Deal Context:
  Total: €50,000 enterprise license
  Payment plan: 3 installments of €16,667 each
  
Payment Intent series:
  Installment 1 (immediate): amount: 1666700, description: "Installment 1/3 Enterprise License"
  Installment 2 (+30 days): Scheduled Payment Intent
  Installment 3 (+60 days): Scheduled Payment Intent
  
Automation:
  - Successful installment 1 → Feature activation  
  - Scheduled installments → Automatic follow-up calls  
  - Payment failure → Account manager notification  

Stripe Response Handling

Successful Payment Intent Creation

{
  "id": "pi_abc123def456ghi789",
  "object": "payment_intent",
  "amount": 500000,
  "currency": "eur",
  "status": "requires_payment_method",
  "customer": "cus_abc123def456",
  "description": "Deposit Project CRM Integration",
  "client_secret": "pi_abc123def456ghi789_secret_xyz",
  "created": 1640995200,
  "metadata": {
    "order_id": "ORD-2024-001",
    "call_source": "mid_call_tool",
    "customer_phone": "+49123456789"
  },
  "next_action": {
    "type": "use_stripe_sdk"
  }
}

Natural Language Integration

Template: "I am preparing the payment for {{amount}} {{currency}}..."Contextual Examples:
One-time Payment:
  "I am preparing the payment for €5,000..."

Subscription:
  "I am setting up your monthly subscription for €99..."

Deposit:
  "I am creating the payment link for your deposit of €2,500..."
Template: "Payment has been prepared. Payment Intent ID: {{response.id}}"Customer-friendly variants:
With email follow-up:
  "Payment has been prepared. You will receive an email shortly  
   with the secure payment link for €5,000."

With security assurance:
  "All payment data is securely processed via Stripe -  
   we do not store any credit card information."

With next steps:
  "The payment link is ready to be sent. After payment, we will  
   immediately activate your new features."

Compliance & Security

PCI-DSS Compliance

Secure Payment Handling

Best Practices:
  • Never include credit card data in Mid-call Actions
  • Only create Payment Intents, no direct charging
  • Use Stripe-hosted checkout for secure entry
  • PCI Level 1 compliance ensured by Stripe

GDPR Compliance

Data Privacy Aspects:
  • Minimal metadata storage
  • Customer consent for payment processing
  • Audit trail of all payment activities
  • Right to deletion for payment metadata

Webhook Integration for Payment Status

Stripe Webhook Events:
  payment_intent.succeeded:
    → Customer notification: "Payment received"
    → CRM update: Deal status "Paid"
    → Service activation: unlock features
    → Team notification: Payment confirmed
  
  payment_intent.payment_failed:
    → Customer support notification
    → Retry payment link sent
    → Account manager alert
    → Offer alternative payment methods
  
  payment_intent.canceled:
    → Set deal status to "Payment Canceled"
    → Follow-up task for sales team
    → Start customer retention workflow

Advanced Stripe Features

Subscription Management

Subscription Workflow:
  
Payment Intent for recurring payments:
  amount: 9900  # €99/month
  currency: "eur"
  setup_future_usage: "off_session"  # For recurring payments
  metadata: {
    "subscription_plan": "professional",
    "billing_interval": "monthly"
  }

Customer Communication:
  "Your Professional subscription for €99 monthly will be set up.  
   After the first payment, all premium features will be activated."
Invoice-based Payments:
  
For B2B customers:
  - Payment Intent with payment_method_types: ["sepa_debit"]
  - Automatic invoice generation  
  - NET-30 payment terms
  
Customer Experience:
  "For your company, we set up invoicing with 30-day payment terms.  
   You will receive the invoice via email."
Payment Security: Never use Stripe secret keys in frontend code. Mid-call Actions run server-side and are therefore safe for secret key usage.
Payment tip: Combine Stripe Payment Intents with CRM integration for complete payment-to-revenue attribution. This allows precise ROI tracking of mid-call sales conversions.