> For the complete documentation index, see [llms.txt](https://partners.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partners.botpenguin.com/partner-platform-guidelines/integration/setup-razorpay-account.md).

# Setup RazorPay Account

### What is Razorpay?

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

Integrating Razorpay with BotPenguin allows automated payment processing, subscription management, and real-time payment status synchronization for your Agency customers.

***

### Benefits of Razorpay Integration

* 💳 Accept payments through multiple payment methods.
* ⚡ Automate customer plan activation after successful payments.
* 🔄 Receive real-time payment status updates.
* 📊 Track payment activity efficiently.
* 🚀 Scale your agency billing operations with a reliable payment gateway.

***

### Expected Outcome

After setting this up:

* Razorpay will be successfully connected to your Agency Panel.
* Customer payments will be processed through Razorpay.
* Payment status updates will automatically sync with BotPenguin.
* Subscription and billing workflows will function seamlessly.

{% hint style="info" icon="lightbulb" %}
Tip: Perform a test payment after setup to verify the integration is working correctly.
{% endhint %}

***

### 🔐 Prerequisites

Before setting up this integration, ensure you have:

* An active Razorpay account.
* Administrator access to the Razorpay dashboard.
* Access to Razorpay API Keys.
* Permission to create Webhooks in Razorpay.

{% hint style="warning" icon="triangle-exclamation" %}
Missing any of the above prerequisites may prevent successful integration.
{% endhint %}

***

## How to Use Razorpay Integration

### A. Connecting Razorpay from Agency Panel

1. Login to your **Agency Panel**.
2. Navigate to **"Configuration"** from the left sidebar.
3. Click on **"Integrations"** and locate **"Razorpay"**.

<figure><img src="/files/QqLCLeuQnS552fSCm3Qq" alt=""><figcaption></figcaption></figure>

4. Click **"Connect"**.
5. You will be prompted to enter Razorpay credentials.

<figure><img src="/files/TvsWoPmSKEWDrbgV8pmU" alt=""><figcaption></figcaption></figure>

***

### B. Generate Razorpay API Credentials

1. Login to your Razorpay Dashboard.
2. Navigate to **Settings → API Keys**

<figure><img src="/files/Eb9NLo1EwsalkIdmpB0l" alt=""><figcaption></figcaption></figure>

3. Click **"Generate API Key"**.

<figure><img src="/files/mNQNnq5O5fKvgwPZu1eK" alt=""><figcaption></figcaption></figure>

5. Copy the following values:
   1. Key ID
   2. Key Secret

{% hint style="warning" icon="triangle-exclamation" %}
Store the Key Secret securely. It may not be visible again after creation.
{% endhint %}

<figure><img src="/files/6SaJInLl9R0vzylv9gkR" alt=""><figcaption></figcaption></figure>

***

### C. Configure Razorpay Webhook (Mandatory)

To ensure payment events are correctly synchronized with BotPenguin, you must configure a webhook in Razorpay.

1. In your Razorpay Dashboard, navigate to: **Settings → Webhooks**

<figure><img src="/files/dD6paASk6Dx8WFkuaUlj" alt=""><figcaption></figcaption></figure>

2. Click **"Add New Webhook"**.
3. Enter the following Webhook URL:

```
<https://api.v7.botpenguin.com/webhook/razorpay-v2>
```

4. Add the webhook secret:

```
BOTPENGUIN
```

5. Ensure the following events are selected:
   1. payment.authorized
   2. payment.failed
   3. payment.captured
   4. payment.dispute.created
   5. order.paid
   6. order.notification.delivered
   7. order.notification.failed
   8. payment.dispute.won
   9. payment.dispute.lost
   10. payment.dispute.closed
   11. payment.dispute.under\_review
   12. payment.dispute.action\_required
   13. payment.downtime.started
   14. payment.downtime.updated
   15. payment.downtime.resolved
   16. payment\_link.paid
   17. payment\_link.partially\_paid
   18. payment\_link.expired
   19. payment\_link.cancelled

<figure><img src="/files/ZT9zgSmZXmOMwqx9XnN4" alt=""><figcaption></figcaption></figure>

6. Click **"Create Webhook"**.

***

### D. Finalize Razorpay Integration in BotPenguin

1. Return to **Agency Panel → Configuration → Integrations → Razorpay**
2. Enter the following details:
   1. Razorpay Key ID
   2. Razorpay Key Secret

<figure><img src="/files/8V7gwhOvoQYZHspbKZ7W" alt=""><figcaption></figcaption></figure>

3. Click **"Connect"**.
4. Wait for the connection confirmation.

***

### E. Configure Customer Plans

1. Navigate to **Customer Plans → Configurations**
2. Expand the **"Currency & Payments"** section.
3. Select the desired currency.
4. Choose **"Razorpay"** as the payment gateway.
5. Click **"Save Changes"**.

***

### 🔄 How Data Flows

* Customer makes payment through Razorpay.
* Razorpay processes the transaction.
* Razorpay sends payment event updates to BotPenguin through the configured webhook.
* BotPenguin updates payment status and subscription records automatically.
* Customer plans are activated or renewed based on payment status.

***

### 🚫 Limitations

* Webhook configuration is mandatory for real-time synchronization.
* Missing webhook events may result in delayed payment updates.
* API credentials must remain active and valid.
* Razorpay account restrictions may impact payment processing.

***

### Best Practices

> 💡 Always configure the webhook before going live.

> ⚠️ Ensure all required events are selected while creating the webhook.

> 🚀 Perform a test payment after setup to verify the integration.

> 🎯 Regularly monitor webhook delivery logs in Razorpay.

***

### Troubleshooting

<details>

<summary>Razorpay connection fails</summary>

Verify Key ID and Key Secret are correct.

</details>

<details>

<summary>Payment status not updating</summary>

Confirm webhook URL and events are configured correctly.

</details>

<details>

<summary>Subscription not activating</summary>

Check whether `payment.captured` and `order.paid` events are enabled.

</details>

<details>

<summary>Webhook delivery failures</summary>

Verify the webhook URL is exactly `https://api.v7.botpenguin.com/webhook/razorpay-v2`.

</details>

<details>

<summary>Invalid credentials error</summary>

Regenerate API Keys and reconnect the integration.

</details>

***

### FAQs

<details>

<summary>Do I need a Razorpay account to use this integration?</summary>

Yes. An active Razorpay account is required to connect Razorpay with BotPenguin.

</details>

<details>

<summary>Is webhook configuration mandatory?</summary>

Yes. Without the webhook, BotPenguin will not receive payment status updates automatically.

</details>

<details>

<summary>What webhook URL should I use?</summary>

Use:

`https://api.v7.botpenguin.com/webhook/razorpay-v2`

</details>

<details>

<summary>What webhook secret should I configure?</summary>

Use:

`BOTPENGUIN`

</details>

<details>

<summary>Which events are required?</summary>

All events listed in the webhook configuration section should be selected to ensure proper synchronization.

</details>

<details>

<summary>Can I reconnect Razorpay later?</summary>

Yes. You can disconnect and reconnect Razorpay at any time from the Integrations section.

</details>

<details>

<summary>How do I verify that the integration is working?</summary>

Perform a test payment and confirm that the payment status updates successfully inside BotPenguin.

</details>

***

### Support

If you still have questions for our team, write to us at [**support@botpenguin.com**](mailto:support@botpenguin.com). We'll get back to you within 48 hours.

***

### 🎉 Completion

🎉 Congratulations, you have successfully configured Razorpay with your BotPenguin Agency Panel! Your payment processing and subscription management workflows are now ready to operate automatically.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://partners.botpenguin.com/partner-platform-guidelines/integration/setup-razorpay-account.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
