stripeSetup Stripe Account

Seamlessly integrate Stripe to unlock secure, scalable, and automated payment collection across subscriptions, invoices, and one-time transactions.

Overview

Stripe integration allows you to process customer payments using your Stripe account. Once connected, all chatbot-based payments (orders, subscriptions, invoices, etc.) are routed through Stripe for secure and seamless transactions.


Prerequisites

Before starting, ensure the following:

  • An active Stripe account

  • Admin access to your Agency dashboard

  • Stripe Secret Key and Publishable (Public) Key

Setup your Stripe Account

Step 1: Setup Stripe Account

Follow the below official documentation to create the account

Create Stripe Account

Step 2: Generate API Key Credentials

Follow the below official documentation to create the account.

Generate API Keys

A. How to Get Stripe Secret Key and Publishable Key

Follow these steps in your Stripe account:

  1. Log in to your Stripe Dashboard.

  2. Go to Developers → API Keys.

  3. Locate the following keys:

    • Secret Key (starts with sk_)

    • Publishable Key (starts with pk_)

  4. Copy both keys and keep them secure.

To enable different payment methods for your clients:

  • Go to Settings → Payments.

  • Switch to Payment Method tab.

  • Enable the Payment Methods for your users.

  • The enabled payment methods will appear on the payment gateway when a user proceeds to make a payment.

circle-info

Users who opt for recurring payments will not be redirected to the Stripe hosted payment page. Instead, the subscription amount will be automatically charged to the card saved in their subscription details.

⚠️ Important:

  • Keep your Secret Key confidential.

  • Do not share it publicly or expose it in client-side code.


B. Steps to Integrate Stripe with Agency

Step 1: Open Integrations in Agency

  1. Log in to your Agency Dashboard

  2. From the left sidebar, click "Integrations".

  3. Locate the Stripe Integration by searching for it in the search box.

  4. Click on "Connect" button.


Step 2: Add Stripe API Keys and Selecting the Payment Mode

You will see the following fields:

  • Stripe Secret Access Key → Paste your Stripe Secret Key

  • Stripe Public Key → Paste your Stripe Publishable Key

  • Payment Mode → Select one of the following:

1. Custom Mode:

In Custom mode, the payment is processed directly inside the Agency panel. The user enters their card details within the chat or portal, and the payment is completed without redirecting to an external Stripe page. After a successful payment, the system shows a confirmation message and the invoice appears in the subscription or invoice tab.

Important Setting for Custom Mode If you are using Custom mode, you must enable card tokenization for your custom payment form in your Stripe dashboard. By default, Stripe only allows card tokenization through its pre-built UI components such as Stripe Checkout or Stripe Elements. Since Custom mode uses a custom payment interface, this setting must be enabled.

Steps to enable it:

  1. Log in to your Stripe Dashboard.

  2. Find the option: “Enable card data collection with a publishable key without using Stripe's pre-built UI elements.”

  3. Enable this setting and save the changes.

This allows your custom payment form to securely send card details to Stripe and complete transactions successfully.

  1. Stripe Hosted Page Mode:

In this mode, users are redirected to Stripe’s secure hosted payment page to complete the transaction. After payment, they are returned to the portal. This mode uses Stripe’s built-in UI, so no additional tokenization settings are required.


Step 3: Save Integration

  1. Click Add Details.

  2. Wait for the confirmation message.

  3. Stripe integration will be successfully enabled.

Field Descriptions

Field
Description

Stripe Secret Access Key

Private key used to process payments securely via Stripe.

Stripe Public Key

Public key used to initialize payment sessions.

Payment Mode

Defines whether payment happens inside the chatbot or via Stripe hosted page.


Enable Stripe Payment Method for Customers

After completing the Stripe Integration, you need to enable it as a payment method for your customers.

Steps:

  1. Log in to your dashboard.

  2. Go to Customers → Customer Plans.

  3. Open the Configuration tab.

  4. Navigate to Currency & Payment Reminders.

  5. Under Set Payment Method For Your Currencies:

    • Select the Currency (e.g., USD).

    • Choose Stripe as the Payment Method.

    • Select Payment Grace Applicable.

  6. Click the Update button to save the settings.

The selected currency will now use Stripe as the payment method for customer subscriptions and invoices.


Common Errors & Solutions

❌ Invalid API Key Error

  • Ensure keys are copied correctly

  • Confirm you are using Live keys, not Test keys (unless in test mode)

❌ Payments Not Triggering

  • Verify Stripe integration is active

  • Check chatbot flow has a payment component configured

❌ Currency or Country Issues

  • Ensure your Stripe account supports the selected currency

  • Complete Stripe account verification


Security Best Practices

  • Never expose Stripe Secret Key in public code

  • Rotate API keys if compromised

  • Enable Stripe webhooks (if required for advanced use cases)


Supported Use Cases

  • One-time payments

  • Order payments

  • Service charges

  • Subscription billing (if configured in bot logic)


FAQs :

chevron-rightDo I need a Stripe account before integrating?hashtag

Yes. You must have an active and verified Stripe account before starting the integration.

chevron-rightWhat credentials are required for Stripe integration?hashtag

You need the following keys from your Stripe dashboard:

  • Secret Key (starts with sk_)

  • Publishable Key (starts with pk_)

chevron-rightWhere can I find my Stripe API keys?hashtag
  • Log in to your Stripe Dashboard.

  • Go to Developers → API Keys.

  • Copy the Secret Key and Publishable Key.

chevron-rightWhat is the difference between Custom mode and Stripe Hosted Page mode?hashtag
  • Custom Mode: Payment happens directly inside the chatbot or portal without redirecting the user.

  • Stripe Hosted Page: The user is redirected to Stripe’s secure payment page to complete the transaction.

chevron-rightDo I need to change any Stripe settings for Custom mode?hashtag

Yes. You must enable card tokenization for custom forms:

  1. Go to Stripe Dashboard → Settings → Integration Settings.

  2. Enable “Allow card data collection with publishable key without Stripe’s UI elements.”

chevron-rightWill recurring subscription users be redirected to Stripe’s hosted page?hashtag

No. Users with recurring subscriptions will be charged automatically from their saved cards. They will not be redirected to the Stripe hosted payment page.

chevron-rightWhy am I getting an “Invalid API Key” error?hashtag

This usually happens because:

  • Keys were copied incorrectly.

  • Test keys are used instead of live keys.

  • The Stripe account is not fully activated.

Need Help?

If you face any issues during integration:

  • Recheck API keys

  • Ensure Stripe account is active and verified

  • Contact BotPenguin Support with screenshots and error details

  • If you still have questions for our team, write to us at [email protected]envelope. We’ll get back to you within 48 hours.

Last updated