Stripe Setup
このコンテンツはまだ日本語訳がありません。
Connecting Stripe gives your agent access to customer payment data. When someone emails asking about a charge, invoice, or subscription, your agent can look it up in real time and include the details in its reply.
What your agent can do with Stripe
Section titled “What your agent can do with Stripe”- Look up invoices and payment history
- Check subscription status
- Check payment or charge status
- Issue full or partial refunds
- Create payment links
- Generate customer portal links (self-service billing)
- Cancel subscriptions (scheduled at period end)
Prerequisites
Section titled “Prerequisites”- A Stripe account (any plan, including free)
- Access to the Stripe Dashboard with permission to view API keys
- A Know Reply workspace on a plan that includes integrations
Step 1: Create a Restricted API Key
Section titled “Step 1: Create a Restricted API Key”We recommend creating a restricted key rather than using your full Secret Key. Restricted keys limit access to only the resources Know Reply needs.
- Log in to the Stripe Dashboard
- Click Developers in the top-right corner
- Click API keys in the left sidebar
- Click Create restricted key
- Stripe may ask “How are you using this key?” Select Providing this key to a third-party application
- Give the key a name like
Know Reply - Set the following resource permissions:
| Resource | Permission |
|---|---|
| Customers | Read |
| Charges | Read |
| Invoices | Read |
| Subscriptions | Read and write |
| Payment Intents | Read |
| Balance Transactions (Transactions) | Read |
| Payment Methods | Read and write |
| Refunds | Write |
| Prices | Write |
| Payment Links | Write |
| Customer portal | Write |
Leave all other resources set to None.
- Click Create key
- Copy the key immediately. It starts with
rk_test_orrk_live_. You will not be able to see it again.
Do not use the Publishable Key. It starts with pk_ and is meant for client-side code. It cannot access payment data.
Test mode vs. live mode
Section titled “Test mode vs. live mode”Stripe has two modes with separate API keys:
- Test mode (
rk_test_...orsk_test_...): Uses fake data. Good for verifying the integration works before going live. - Live mode (
rk_live_...orsk_live_...): Uses real customer and payment data. Use this for production.
Start with a test mode key to confirm everything works, then create a new restricted key in live mode when ready.
Step 2: Enter credentials in Know Reply
Section titled “Step 2: Enter credentials in Know Reply”- Go to Dashboard > Toolkit
- Find Stripe in the list of available integrations
- Paste your Secret Key into the API key field
- Click Connect Now
- You should see a green indicator confirming the connection
Step 3: Configure capabilities
Section titled “Step 3: Configure capabilities”After connecting, you will see a list of functions Stripe can perform. Enable only the ones you want your agent to use. For example, you might enable invoice lookups but disable refunds until you are comfortable with the integration.
Step 4: Test the connection
Section titled “Step 4: Test the connection”- Go to Dashboard > Simulator
- Send a test message like “Can you check my latest invoice?”
- The agent should call the Stripe integration and return invoice details
If you are using a test mode key, the agent will return test data. This is expected.
Common issues
Section titled “Common issues”“Stripe Secret Key is required” error
You may have pasted the Publishable Key (pk_...) instead of the Secret Key or Restricted Key. Go back to the Stripe Dashboard, copy the correct key (rk_... or sk_...), and update your credentials.
Permission denied or “resource not available” errors Your restricted key is missing a required permission. Check the table above and make sure all listed resources are enabled. You can edit the key’s permissions in the Stripe Dashboard under Developers > API keys.
“No Stripe customer found with email” error The agent looks up customers by the sender’s email address. If no Stripe customer exists with that email, the lookup will fail. Make sure the email address in your test matches a customer in your Stripe account (or test data).
Data looks wrong or empty Check whether you are using a test mode key with live customer emails (or vice versa). Test keys only return test data, and live keys only return live data.