Overview
Stripe Actions enable your AI agent to seamlessly handle customer billing inquiries, subscription management, and account updates directly within the chat interface. These actions provide secure, real-time access to customer payment information, streamlining support operations and enhancing customer experience.Prerequisites Required: Before using Stripe Actions, you must:
- Set up Stripe integration with your Chatbase account
- Configure identity verification for secure customer authentication
- Set up contacts with valid
stripe_account
fields for each customer
How Stripe Actions Work
Stripe Actions leverage Chatbase’s identity verification system to securely access customer-specific data. Here’s the workflow:- User Authentication: Customers must be identified using
window.chatbase("identify", {...})
with their unique user ID - Contact Matching: The system matches the authenticated user ID to a contact record containing their Stripe account id.
- Secure Data Access: Actions retrieve only the data associated with the authenticated customer’s Stripe account
- Real-time Responses: AI agent provides immediate answers using live Stripe data
Environment Limitations: Stripe Actions will not function in:
- Chatbase Playground environment
- Action Preview mode
- Compare features
Available Stripe Actions
1. Get Subscription Information
Retrieve and display customer subscription details including current plan, status, billing cycle, and pricing information.Best for:
Answering questions about current subscription status, plan details, renewal dates, and subscription history.
- “What’s my current plan?”
- “When does my subscription renew?”
- “How much am I paying monthly?”
- “Is my subscription active?”
Setup Instructions
1
Create the Action
Navigate to Actions → Create Action and select Stripe Get Subscription Info.

2
Configure Action Details
Action Name: Enter a unique name for the action.When to use: Provide detailed instructions for when the AI should use this action.
3
Save and Enable
Click Save and toggle the action to Enabled to make it available to your AI agent.

Test the action in the embedded widget to ensure it correctly retrieves subscription data for authenticated users.
2. Get Invoice History
Retrieve and display customer invoice history, payment details, and billing records.Best for:
Providing access to billing history, payment confirmations, invoice downloads, and payment troubleshooting.
- “Show me my recent invoices”
- “Was my payment processed?”
- “Can you provide my billing history?”
Setup Instructions
1
Create the Action
Select Stripe Get Invoices from the action creation dialog.

2
Configure Action Details
Action Name: Enter a unique name for the action.When to use: Provide detailed instructions for when the AI should use this action.
3
Save and Test
Save the configuration and test with a sample customer request in the embedded widget.

3. Manage Subscriptions
Comprehensive subscription management including plan changes, upgrades, downgrades, and cancellations.Best for:
Complete subscription lifecycle management, plan changes, adding payment methods and cancellation handling.
- “I want to upgrade my plan”
- “Upgrade my plan to the pro”
- “I need to cancel my subscription”
- “What plans are available?”
Setup Instructions
1
Create the Action
Select Stripe → Manage Subscriptions from the Stripe action options.
2
Configure Subscription Options
Action Name: Enter a unique name for the action.When to use: Provide detailed instructions for when the AI should use this action.

3
Define Available Plans
Configure which subscription plans and options are available for customers to choose from:
- Plan Configuration
- Cancellation Settings
Set up available plans with their behavior.

4
Test All Scenarios
Thoroughly test various subscription management scenarios:

Upgrade Testing
Upgrade Testing
Test upgrading from basic to premium plans with proper proration calculations.
Downgrade Testing
Downgrade Testing
Verify downgrades work correctly with appropriate billing adjustments.
Cancellation Flow
Cancellation Flow
Test the complete cancellation process.

All subscription changes should be immediately reflected in both Stripe and the customer experience.
4. Change Billing Information
Allow customers to update their billing address and other account information.Best for:
Self-service billing updates, address changes and other account information updates.
- “I need to update my billing address”
- “Update my billing email address”
- “Update my billing phone number”
Setup Instructions
1
Create the Action
Select Stripe → Change customer information from the available Stripe actions.

2
Configure Action Details
Action Name: Enter a unique name for the action.When to use:
Provide detailed instructions for when the AI should use this action.
3
Test Security Measures
Test the action with various scenarios to ensure only authenticated users can make changes.

Verify that billing information updates are reflected in both Stripe and the customer’s account.
Troubleshooting
Action Not Triggering
Action Not Triggering
Possible causes:
- Action is disabled in the dashboard
- User is not properly authenticated
- Contact record missing or invalid
stripe_account
- Insufficient “When to use” description
- Enable the action and verify configuration
- Check identity verification implementation
- Validate contact record has correct
stripe_account
field - Enhance action description with more specific use cases
No Data Returned
No Data Returned
Possible causes:
- Invalid Stripe customer ID in contact record
- Stripe account has no subscription or invoice data
- Stripe API permissions insufficient
- Network connectivity issues
- Verify Stripe customer ID exists and is active
- Check Stripe account has relevant data
- Review Stripe integration permissions
- Test Stripe API connectivity directly
Authentication Errors
Authentication Errors
Possible causes:
- User hash validation failing
external_id
doesn’t matchuser_id
- Contact record not found
- Identity verification not called
- Verify hash generation matches expected format
- Ensure
external_id
exactly matches authenticateduser_id
- Create contact record for the user
- Implement proper identity verification flow
Best Practices
Security First
Always validate user identity before processing any billing-related requests. Never allow unauthenticated access to financial data.
Testing Coverage
Thoroughly test all actions with various user scenarios, edge cases, and error conditions before going live.