Skip to content
Try Free →

How to connect Stripe to AskVault

Last updated: · 4 min read

What this integration unlocks

The Stripe integration powers two skills:

  • subscription_manager. Customer asks "what plan am I on?" or "when does my subscription renew?". The bot looks up the live status from Stripe and responds.
  • discount_negotiator. Customer asks for a discount or shows hesitation. The bot offers a pre-approved code within configurable bounds. Cap per visitor, cap per workspace, plus an upper-limit ceiling the model can't override.

Both skills are on the Business plan and above. Business+

Setup, step by step

The integration is OAuth-based. No API key management on your side.

  1. Open AI Agents > Skills > subscription_manager in AskVault. Click Enable.
  2. Click Connect Stripe. OAuth consent flow opens.
  3. Sign in with your Stripe account. Stripe shows you exactly which scopes AskVault is requesting.
  4. Approve. You're redirected back to AskVault. Connection shows active.
  5. Test the lookup. Open your chat widget, ask "what plan am I on?" with a known test email. The bot should return the live status.

Scopes requested

Read-only by default:

  • read_customers to look up customer by email.
  • read_subscriptions to fetch subscription state.
  • read_charges for billing-history questions.
  • read_invoices for invoice-related queries.

For optional write scopes on Enterprise (write_refunds, write_subscriptions), the agreement is reviewed individually because of the risk profile. Most customers should keep the integration read-only and route mutating actions through escalate_to_human.

How the bot resolves a customer

Stripe stores customers by email. When a visitor asks an account question, the bot needs to know which Stripe customer they are. Two patterns:

  1. Identity-verified widget. The visitor is signed in to your product. The widget passes their email via setUser({ email }) with a verified HMAC token. The bot uses that email to look up Stripe directly. Growth+
  2. Verify-by-email flow. The visitor isn't signed in. The bot asks for their email. It then sends a 6-digit code to that email. The visitor types the code back. Once verified, the bot proceeds.

The verify-by-email flow adds about 30 to 45 seconds to the conversation. It's the safer pattern for unauthenticated channels (a public website widget where you don't know who's chatting).

discount_negotiator bounds

The discount_negotiator skill applies pre-approved discount codes. Three configurable bounds keep it safe:

  • Per-visitor cap. Maximum discount any single visitor can receive. Default 15%.
  • Per-workspace cap. Aggregate discount value applied across all visitors per month. Default $5,000 USD equivalent.
  • Per-code cap. Maximum usage count per discount code. Once a code hits this, the bot stops offering it.

Configure under AI Agents > Skills > discount_negotiator > Bounds. The bounds are enforced by AskVault's policy layer; the model proposes a discount and the policy decides whether to apply it.

Webhooks (incoming events from Stripe)

For real-time updates (subscription paused, payment failed, etc.), configure Stripe webhooks to point at AskVault:

  1. In Stripe Dashboard, Developers > Webhooks > Add endpoint.
  2. Endpoint URL: AskVault generates one under Integrations > Stripe > Webhooks. Copy it.
  3. Subscribe to events you care about: customer.subscription.updated, invoice.payment_failed, customer.subscription.deleted.
  4. Save.

The bot then proactively notifies the customer about state changes when they next engage (e.g., "Your payment failed last night; would you like to update your payment method?").

Compliance

The integration is read-only by default. AskVault doesn't store Stripe credentials beyond the OAuth refresh token. PCI compliance stays with Stripe; we never see card numbers.

For audit purposes, every Stripe lookup is logged under Live Chat > [conversation] > Audit log with the customer email queried and the result returned.

Limits

  • Stripe API rate limits. 100 read operations per second in live mode, 25 in test mode. AskVault batches and caches where possible to stay well under this.
  • Lookup latency. About 200 to 400 ms per Stripe API call. The bot's response feels instant at this latency.
  • Multi-account. One Stripe account per AskVault workspace. For multi-account use, create separate workspaces.

Common pitfalls

Bot says "I couldn't find your account". The visitor's email doesn't match any Stripe customer record. They may have used a different email at signup. Bot offers to escalate to a human.

Live mode vs test mode confusion. AskVault connects to whichever mode you authorized. For staging environments, connect to Stripe test mode. Don't mix.

Subscription state shows stale. Stripe webhooks haven't fired since the change. Wait a few seconds, or force a manual lookup.

Discount code rejected. Code expired in Stripe, or per-code cap exhausted. Check Stripe Dashboard > Coupons.

FAQ

Can the bot cancel subscriptions?

Only with write scope, on Enterprise. Most customers keep it read-only and escalate cancellation requests to a human via the escalate_to_human skill.

Can the bot create refunds?

Same as cancellations: write scope on Enterprise only. Read-only by default for safety.

Does this work with Stripe Connect (platform accounts)?

Yes. Connect each connected account to its own AskVault workspace. The OAuth flow handles connected accounts natively.

What about Razorpay or PayPal?

Razorpay integration is built; setup is similar with API-key auth. PayPal is on the roadmap. For other payment processors use the custom_webhook skill to call your backend that bridges to the processor.

Is there a sandbox?

Yes. Connect to Stripe test mode using your test-mode API keys during OAuth. Test customers and subscriptions don't affect production.

Was this page helpful?