For the complete documentation index, see llms.txt. This page is also available as Markdown.

Integrate BotPenguin with Razorpay

This section contains essential information and usage guidelines for integrating Razorpay with your BotPenguin WhatsApp Bot.

What is Razorpay?

Razorpay is a secure payment gateway that enables businesses to collect online payments through multiple payment methods, including UPI, credit cards, debit cards, net banking, wallets, and more.

Integrating Razorpay with BotPenguin allows your WhatsApp chatbot to securely collect payments from customers directly within conversations.


When should you use this?

Use this integration when:

  • You want to collect payments through your WhatsApp chatbot.

  • You need customers to complete payments without leaving the conversation.

  • You want to automate payment collection using Razorpay.


Benefits of Razorpay Integration

  • πŸ’³ Collect payments directly through your WhatsApp chatbot.

  • ⚑ Support multiple payment methods through Razorpay.

  • πŸ”„ Receive payment status updates automatically.

  • πŸ€– Automate payment collection within chatbot conversations.

  • πŸ“ˆ Provide a seamless payment experience for your customers.


Expected Outcome

After completing this setup:

  • Razorpay will be connected to your BotPenguin account.

  • Your WhatsApp chatbot will be able to generate payment requests.

  • Payment status will automatically sync with BotPenguin.

  • Razorpay can be selected as the payment gateway inside the Payment Component.

lightbulb

Tip: Perform a test payment after completing the setup to verify everything is working correctly.


πŸ” Prerequisites

Before setting up this integration, ensure you have:

  • A BotPenguin account.

  • An active Razorpay account.

  • A WhatsApp Bot.

  • Access to your Razorpay API Keys.

  • Permission to create Webhooks in Razorpay.


How to Use Razorpay

1. Open Razorpay Integration

  1. Log in to your BotPenguin account.

  2. Select the WhatsApp Bot you want to configure.

  3. Navigate to Third Party Integrations.

  4. Search for Razorpay.

  5. Click Connect.


2. Generate Razorpay API Keys

  1. Log in to your Razorpay Dashboard.

  2. Search for API Keys.

  1. Open the API Keys page.

  2. If you do not already have credentials, click Generate New API Key.

  1. Copy the following credentials:

    1. Key ID

    2. Key Secret

Store the Key Secret securely. It may not be visible again after creation.


3. Connect Razorpay

  1. Return to BotPenguin.

  2. Enter your:

    • Razorpay Key ID

    • Razorpay Key Secret

  3. Click Connect.


4. Configure Razorpay Webhook

To allow BotPenguin to receive payment status updates, configure a webhook in Razorpay.

  1. In Razorpay, navigate to Account Settings β†’ Webhooks.

  2. Click Add Webhook.

  1. Return to BotPenguin and copy the Webhook URL displayed in the Razorpay integration.

  2. Paste this URL into Razorpay.

  3. Select the following events:

    1. payment.failed

    2. payment_link.paid

    3. payment_link.partially_paid

    4. payment_link.expired

    5. payment_link.cancelled

  4. Click Create Webhook.


5. Open Your Chatflow

  1. Navigate to Chat Flows.

  1. Open the chatflow where you want to collect payments.

  2. You can either:

    1. Open an existing chatflow, or

    2. Create a new chatflow.

6. Add the Payment Component

  1. Add the Payment component onto your chatflow.

  1. Open the component configuration.


7. Configure the Payment Component

  1. Before configuring the payment provider, enter the payment message that will be displayed to the customer.

  2. This message should clearly explain what the customer is paying for before they proceed with the payment.


8. Select RazorPay as the Payment Method and add Payment Amount

  1. Under Payment Method, open the dropdown.

  2. Select RazorPay

  1. Add the amount you want to collect using the link.

  2. Once selected, the Payment component will use your connected RazorPay account to process customer payments.


9. Configure the Flow Logic

  1. Choose what should happen after the payment attempt.

  • Payment Successful: Select the next chatflow that should be displayed after the payment is completed successfully.

  • Payment Failed: Select the next chatflow that should be displayed if the payment fails or is cancelled.

  • Go to next message: You can define the next message the component should redirect the flow to incase the component fails to work.

This allows you to create different conversation paths based on the payment outcome.

lightbulb

Your chatbot is now ready to collect payments using RazorPay. Publish your chatflow to make the payment experience available to your customers.


πŸ”„ How Data Flows

  • A customer initiates payment through your WhatsApp chatbot.

  • BotPenguin creates a payment request using Razorpay.

  • The customer completes the payment.

  • Razorpay sends payment updates to BotPenguin through the configured webhook.

  • BotPenguin updates the payment status and continues the chatbot flow based on the payment result.


🚫 Limitations

  • Razorpay Integration is supported only for WhatsApp Bots.

  • Webhook configuration is mandatory for automatic payment status updates.

  • Invalid API credentials will prevent the integration from connecting.

  • Removing the webhook may stop payment status synchronization.


Best Practices

πŸ’‘ Configure the webhook before using Razorpay in production.

⚠️ Perform a test payment after completing the setup.

πŸš€ Keep your API credentials secure.

🎯 Regularly verify webhook delivery from your Razorpay Dashboard.


Troubleshooting

Unable to connect Razorpay

Likely Cause: The Razorpay Key ID or Key Secret was entered incorrectly.

Resolution: Verify that the Razorpay Key ID and Key Secret have been entered correctly, then reconnect the integration.

Payment status is not updating

Likely Cause: The Razorpay webhook is not configured correctly or required events are not enabled.

Resolution: Verify that the Razorpay webhook has been configured correctly and that all required webhook events are enabled.

Webhook events are not reaching BotPenguin

Likely Cause: The webhook URL is incorrect, inactive, or not configured properly in Razorpay.

Resolution: Ensure the webhook URL has been copied correctly and is active in your Razorpay Dashboard.

Razorpay is not available in the Payment Component

Likely Cause: The Razorpay integration has not been connected successfully.

Resolution: Verify that the integration has been connected successfully from Third Party Apps Integration. Refresh the chatbot editor if necessary.


FAQs

Which bots support Razorpay Integration?

Razorpay Integration is currently supported only for WhatsApp Bots.

Why do I need to configure a webhook?

The webhook allows Razorpay to notify BotPenguin about payment events, enabling automatic payment status updates.

Where can I find my Razorpay API Keys?

Log in to your Razorpay Dashboard and navigate to the API Keys section to generate or view your credentials.

Can I regenerate my API Keys?

Yes. If you generate new API Keys, update them in BotPenguin and reconnect the integration.

Can I use Razorpay without configuring the webhook?

No. The webhook is required for BotPenguin to receive payment status updates from Razorpay.

How can I verify that the integration is working?

Configure the Payment Component with Razorpay as the payment gateway and perform a test payment through your WhatsApp chatbot.


WhatsApp Payment ComponentsWhatsapp Bot3rd Party Apps Integrations

πŸŽ‰ Completion

πŸŽ‰ Congratulations! Your Razorpay account has been successfully connected to BotPenguin. You can now securely collect payments through your WhatsApp chatbot.


Support

If you still have questions for our team, write to us at support@botpenguin.com. We'll get back to you within 48 hours.

Last updated

Was this helpful?