- Set up the Stripe integration with your Chatbase account
- Configure identity verification for secure customer authentication
- Set up contacts with valid
stripe_accountsentries for each customer
Available Stripe Actions
How Stripe Actions work
Stripe Actions use Chatbase’s identity verification system to securely access customer-specific data:- User authentication: Customers are 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: The AI agent answers immediately using live Stripe data
stripe_accounts entry. To test the real thing end to end, embed the JavaScript script on your site and run the Action there.Examples for subscription businesses
These examples show how the four Stripe Actions above can cover common billing conversations. Each one uses only the Actions on this page.SaaS product: plan and payment questions
SaaS product: plan and payment questions
SaaS product: self-service upgrades
SaaS product: self-service upgrades
Membership: cancellations on your terms
Membership: cancellations on your terms
Membership: billing detail updates
Membership: billing detail updates
How to create a Stripe Action
Every Stripe Action is created the same way. The Action sections below list only what differs: which Action to pick and any extra configuration it needs.Navigate to Actions
Create the Action
Configure General Settings
Configure the Action's own settings
Choose Channels
Enable and Test
Actions
1. Get subscription information
Retrieve and display customer subscription details, including current plan, status, billing cycle, and pricing information.Best for:
- “What’s my current plan?”
- “When does my subscription renew?”
- “How much am I paying monthly?”
- “Is my subscription active?”
Settings
Action: Stripe Get Subscription Info.

2. Get invoice history
Retrieve and display customer invoice history, payment details, and billing records.Best for:
- “Show me my recent invoices”
- “Was my payment processed?”
- “Can you provide my billing history?”
Settings
Action: Stripe Get Invoices.

3. Manage subscriptions
Comprehensive subscription management, including plan changes, upgrades, downgrades, and cancellations.Best for:
- “I want to upgrade my plan”
- “Upgrade my plan to the pro”
- “I need to cancel my subscription”
- “What plans are available?”
Settings
Action: Stripe → Manage Subscriptions.
Define available plans and cancellations
Manage subscriptions has four sections: General, Subscriptions, Cancellation, and Channels. Plans and cancellations are set in the middle two.- Subscriptions
- Cancellation
- Customers can switch plans: let customers move to another plan.
- Customers can change quantity of their plan: let customers change how many units they pay for.
- Products: pick the products customers can choose from, with Minimum and Maximum quantity rules.
- Prorate subscription updates: charge or credit the difference when a plan changes. Choose Invoice immediately or Issue invoice at the end of billing period.


4. Change billing information
Allow customers to update their billing address and other account information.Best for:
- “I need to update my billing address”
- “Update my billing email address”
- “Update my billing phone number”
Settings
Action: Stripe → Change customer information.

Limitations
- Stripe Actions require an authenticated customer. Every Action reads or writes the signed-in customer’s own Stripe record, so identity verification must be configured and the customer must be identified.
- Each customer needs a contact record with a valid
stripe_accountsentry. Without it, the Action has no Stripe customer to act on. - In the Playground, they only run through Chat as user. Start the conversation with Chat as user and a User ID that matches a contact with a valid
stripe_accountsentry. Action Preview and Compare can’t identify a customer, so the Actions don’t run there.
Troubleshooting
The AI agent never uses a Stripe Action
The AI agent never uses a Stripe Action
- The Action is disabled in the dashboard, or turned off for the channel
- The customer is not properly authenticated
- The contact record is missing or has an invalid
stripe_accountsentry - The When to use description is too vague to match what the customer asked
- Enable the Action and check its Channels step
- Check your identity verification implementation
- Validate that the contact record has a correct
stripe_accountsentry - Rewrite When to use with the phrases customers actually type
No data is returned
No data is returned
- Invalid Stripe customer ID in the contact record
- The Stripe account has no subscription or invoice data
- Stripe API permissions are insufficient
- Network connectivity issues
- Verify the Stripe customer ID exists and is active
- Check that the Stripe account has relevant data
- Review the Stripe integration permissions
- Test Stripe API connectivity directly
Authentication errors
Authentication errors
- User hash validation is failing
external_iddoesn’t matchuser_id- The contact record is not found
- Identity verification was never called
- Verify hash generation matches the expected format
- Ensure
external_idexactly matches the authenticateduser_id - Create a contact record for the customer
- Implement the identity verification flow properly
Best Practices
Security First
Testing Coverage
Keep High-Stakes Actions on Rails
Clear Action Triggers
Frequently asked questions
Do Stripe Actions work on WhatsApp, email, or other channels?
Do Stripe Actions work on WhatsApp, email, or other channels?
How do I stop the AI agent from changing a plan on its own?
How do I stop the AI agent from changing a plan on its own?
What happens when a Stripe Action fails?
What happens when a Stripe Action fails?
stripe_accounts entry or insufficient Stripe permissions.Can I test Stripe Actions with Tests?
Can I test Stripe Actions with Tests?
How many Stripe Actions can I add, and what do they cost?
How many Stripe Actions can I add, and what do they cost?
