
Stripe
Stripe powers online and in-person payment processing and financial solutions for businesses of all sizes.
Overview
Stripe is a comprehensive payments platform that handles everything from payment processing to financial reporting. This guide will walk you through connecting your Hypermode agent to Stripe, enabling automated payment operations, customer management, and financial data analysis.Prerequisites
Before connecting Stripe to Hypermode, you’ll need:- A Stripe account (individual or business)
- Stripe API credentials (publishable and secret keys)
- A Hypermode workspace
Setting up Stripe
Create your Stripe account
If you haven’t already, sign up for a Stripe account. You can start with a test account to experiment safely.Access your API keys
Navigate to your Stripe dashboard to find your API credentials:- Go to Developers → API keys in your Stripe dashboard
- You’ll see both test and live API keys
- Start with test keys for development

Stripe provides separate test and live environments. Always start with test
keys during development to avoid processing real payments accidentally.
Create a restricted API token (Recommended)
For enhanced security, create a restricted API token with only the permissions your agent needs:- Go to Developers → API keys
- Click Create restricted key
- Select specific permissions based on your use case

- Customers: Read and Write
- Payment Intents: Read and Write
- Charges: Read
- Invoices: Read and Write
- Products: Read and Write
- Subscriptions: Read and Write
Only grant the minimum permissions your agent actually needs. This follows the
principle of least privilege and enhances security.
Creating your Stripe agent

Create a new agent
From the Hypermode Agents console, create a new agent:- Click the Create new Agent button from the agents view or select Create new >> Create new agent from the threads view.
- Enter a name for your agent.
- Click the Create Agent button.

Agent profile
You can view and edit agent details in the agent profile. The agent profile includes the agent name, description, and instructions. You can also view your threads with this agent as well as manage the agent’s tasks and knowledge.
Agent instructions
You can edit the agent instructions in the agent profile. Editing the agent’s instructions is useful for personalizing your agent and customizing how your agent will work with you and your team.
Connecting to Stripe
Add the Stripe connection
Select the Agents tab in the left navigation bar, then click your StripeSleuth agent. Select the “Connections” tab.- Select the Connection tab
- Select “Connect” next to Stripe in the list of available connections

Configure credentials
Enter your Stripe credentials:- API Key: Your Stripe secret key (starts with
sk_test_
for test mode orsk_live_
for live mode)

Keep your secret API key secure! This key provides full access to your Stripe
account and should never be exposed in client-side code or shared publicly.We recommend using a Stripe Sandbox environment for development and testing.
Create a new thread with your agent

Test basic connectivity
Start a new thread and test the connection with a simple query:
Test permissions
Verify your API key has the necessary permissions:
Setting up your Stripe environment
Unlike databases, Stripe doesn’t require schema setup. However, you’ll want to
configure products, pricing, and webhook endpoints for a complete integration.
Create test products
Set up some test products to work with:Update agent instructions
Enhance your agent’s understanding by updating its instructions with your business context:Testing payment operations
Test 1: Create a customer
Test customer creation capability:
Test 2: Process a test payment
Try processing a payment using Stripe’s test card numbers:In test mode, use Stripe’s test card numbers like
4242424242424242
for
successful payments or 4000000000000002
for declined cards.
Test 3: Handle subscriptions
Test subscription management:
What you can do
With your Stripe connection established, your agent can:- Process payments with various payment methods
- Manage customers and their payment information
- Handle subscriptions including creation, updates, and cancellations
- Process refunds and handle disputes
- Generate invoices and manage billing
- Analyze financial data and generate reports
- Manage products and pricing dynamically
- Integrate with other tools like CRM systems, email marketing, and accounting software
Best practices
- Security first: Always use restricted API keys with minimal required permissions
- Test thoroughly: Use Stripe’s test environment before going live
- Error handling: Implement robust error handling for payment failures
- Compliance: Ensure PCI compliance and follow data protection regulations
- Monitoring: Set up alerts for failed payments and unusual activity
Advanced operations
Payment processing workflows
Your agent can handle complex payment scenarios:Subscription management
Automate subscription lifecycle management:Financial reporting
Generate comprehensive financial reports:Dispute handling
Manage chargebacks and disputes:Integration examples
E-commerce automation
SaaS billing management
Troubleshooting
Common connection issues
- Invalid API key: Verify your key is correct and has proper permissions
- Test vs Live mode: Ensure your API key matches the intended environment
- Rate limiting: Stripe has rate limits; your agent will handle these automatically
- Insufficient permissions: Update your restricted key permissions as needed
Payment failures
- Declined cards: Use appropriate test card numbers in test mode
- Authentication required: Handle 3D Secure authentication flows
- Insufficient funds: Test with appropriate test card numbers
- Invalid parameters: Verify all required fields are provided correctly
Webhook issues
- Endpoint verification: Ensure your webhook endpoint is accessible
- Event handling: Verify you’re listening for the correct event types
- Signature verification: Implement proper webhook signature verification
Security considerations
Never expose your Stripe secret keys in client-side code, logs, or public
repositories. Always use environment variables or secure key management
systems.
- API key rotation: Regularly rotate your API keys
- Webhook signatures: Always verify webhook signatures to ensure authenticity
- PCI compliance: Follow PCI requirements when handling card data
- Audit logs: Monitor your Stripe dashboard for unusual activity
- Two-factor authentication: Enable 2FA on your Stripe account
Learn more
Combine Stripe with other Hypermode connections to create powerful business
workflows. For example, use Slack to notify your team of large payments,
GitHub to track payment-related code changes, or your CRM to update customer
information after successful payments.
Compliance and regulations
PCI compliance
When handling payment card data:- Use Stripe’s secure payment forms
- Never store card details directly
- Implement proper access controls
- Regularly monitor for vulnerabilities
Data protection
- Follow GDPR requirements for customer data
- Implement proper data retention policies
- Provide mechanisms for data deletion
- Ensure proper consent management
Financial regulations
- Comply with local financial regulations
- Implement proper record keeping
- Ensure accurate tax reporting
- Handle dispute resolution appropriately