Stripe Integration
Payment processing and subscription management with Stripe integration for CrewAI.
Overview
Enable your agents to manage payments, subscriptions, and customer billing through Stripe. Handle customer data, process subscriptions, manage products, and track financial transactions to streamline your payment workflows with AI-powered automation.
Prerequisites
Before using the Stripe integration, ensure you have:
- A CrewAI Enterprise account with an active subscription
- A Stripe account with appropriate API permissions
- Connected your Stripe account through the Integrations page
Available Tools
Customer Management
STRIPE_CREATE_CUSTOMER
STRIPE_CREATE_CUSTOMER
Description: Create a new customer in your Stripe account.
Parameters:
emailCreateCustomer
(string, required): Customer’s email addressname
(string, optional): Customer’s full namedescription
(string, optional): Customer description for internal referencemetadataCreateCustomer
(object, optional): Additional metadata as key-value pairs (e.g.,{"field1": 1, "field2": 2}
)
STRIPE_GET_CUSTOMER_BY_ID
STRIPE_GET_CUSTOMER_BY_ID
Description: Retrieve a specific customer by their Stripe customer ID.
Parameters:
idGetCustomer
(string, required): The Stripe customer ID to retrieve
STRIPE_GET_CUSTOMERS
STRIPE_GET_CUSTOMERS
Description: Retrieve a list of customers with optional filtering.
Parameters:
emailGetCustomers
(string, optional): Filter customers by email addresscreatedAfter
(string, optional): Filter customers created after this date (Unix timestamp)createdBefore
(string, optional): Filter customers created before this date (Unix timestamp)limitGetCustomers
(string, optional): Maximum number of customers to return (defaults to 10)
STRIPE_UPDATE_CUSTOMER
STRIPE_UPDATE_CUSTOMER
Description: Update an existing customer’s information.
Parameters:
customerId
(string, required): The ID of the customer to updateemailUpdateCustomer
(string, optional): Updated email addressname
(string, optional): Updated customer namedescription
(string, optional): Updated customer descriptionmetadataUpdateCustomer
(object, optional): Updated metadata as key-value pairs
Subscription Management
STRIPE_CREATE_SUBSCRIPTION
STRIPE_CREATE_SUBSCRIPTION
Description: Create a new subscription for a customer.
Parameters:
customerIdCreateSubscription
(string, required): The customer ID for whom the subscription will be createdplan
(string, required): The plan ID for the subscription - Use Connect Portal Workflow Settings to allow users to select a planmetadataCreateSubscription
(object, optional): Additional metadata for the subscription
STRIPE_GET_SUBSCRIPTIONS
STRIPE_GET_SUBSCRIPTIONS
Description: Retrieve subscriptions with optional filtering.
Parameters:
customerIdGetSubscriptions
(string, optional): Filter subscriptions by customer IDsubscriptionStatus
(string, optional): Filter by subscription status - Options: incomplete, incomplete_expired, trialing, active, past_due, canceled, unpaidlimitGetSubscriptions
(string, optional): Maximum number of subscriptions to return (defaults to 10)
Product Management
STRIPE_CREATE_PRODUCT
STRIPE_CREATE_PRODUCT
Description: Create a new product in your Stripe catalog.
Parameters:
productName
(string, required): The product namedescription
(string, optional): Product descriptionmetadataProduct
(object, optional): Additional product metadata as key-value pairs
STRIPE_GET_PRODUCT_BY_ID
STRIPE_GET_PRODUCT_BY_ID
Description: Retrieve a specific product by its Stripe product ID.
Parameters:
productId
(string, required): The Stripe product ID to retrieve
STRIPE_GET_PRODUCTS
STRIPE_GET_PRODUCTS
Description: Retrieve a list of products with optional filtering.
Parameters:
createdAfter
(string, optional): Filter products created after this date (Unix timestamp)createdBefore
(string, optional): Filter products created before this date (Unix timestamp)limitGetProducts
(string, optional): Maximum number of products to return (defaults to 10)
Financial Operations
STRIPE_GET_BALANCE_TRANSACTIONS
STRIPE_GET_BALANCE_TRANSACTIONS
Description: Retrieve balance transactions from your Stripe account.
Parameters:
balanceTransactionType
(string, optional): Filter by transaction type - Options: charge, refund, payment, payment_refundpaginationParameters
(object, optional): Pagination settingspageCursor
(string, optional): Page cursor for pagination
STRIPE_GET_PLANS
STRIPE_GET_PLANS
Description: Retrieve subscription plans from your Stripe account.
Parameters:
isPlanActive
(boolean, optional): Filter by plan status - true for active plans, false for inactive planspaginationParameters
(object, optional): Pagination settingspageCursor
(string, optional): Page cursor for pagination
Usage Examples
Basic Stripe Agent Setup
Filtering Specific Stripe Tools
Subscription Management
Financial Analytics and Reporting
Subscription Status Reference
Understanding subscription statuses:
- incomplete - Subscription requires payment method or payment confirmation
- incomplete_expired - Subscription expired before payment was confirmed
- trialing - Subscription is in trial period
- active - Subscription is active and current
- past_due - Payment failed but subscription is still active
- canceled - Subscription has been canceled
- unpaid - Payment failed and subscription is no longer active
Metadata Usage
Metadata allows you to store additional information about customers, subscriptions, and products:
This integration enables comprehensive payment and subscription management automation, allowing your AI agents to handle billing operations seamlessly within your Stripe ecosystem.