> For the complete documentation index, see [llms.txt](https://help.botpenguin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.botpenguin.com/ai-agents/prompts-and-tools/razorpay.md). Agents can also search and read this documentation through its [MCP server](https://help.botpenguin.com/~gitbook/mcp).

# Razorpay

Learn how to integrate BotPenguin with Razorpay

The Razorpay tool lets your AI agent create a payment link and check or cancel it. You add it on the Prompt & Tools page, choose which actions the agent may use, and tell the agent when to use it.

***

### Prerequisites

* An AI agent. See Create your first AI Agent.
* A Razorpay account.
* Edit access to AI Agents.

***

### Key definitions

| Term               | Meaning                                                                              |
| ------------------ | ------------------------------------------------------------------------------------ |
| Tool               | Something your agent can use to take an action.                                      |
| Action             | One thing a tool can do. You turn each action on or off with Allowed.                |
| Usage instructions | Your words that tell the agent when to use the tool and what to do.                  |
| Connected account  | The account of the other service. You connect it once and reuse it for other agents. |

***

### What the Razorpay tool can do

| Action                  | What it does                   |
| ----------------------- | ------------------------------ |
| Create payment link     | Creates a payment link.        |
| Get payment link status | Shows whether a link was paid. |
| Cancel payment link     | Cancels a payment link.        |

You fill in these fields when you set up the tool:

* Connection (your Razorpay account)
* Default currency (optional)

***

### Steps

1. Open **Prompt & Tools** under Setup in the AI Agent sidebar. Click **Add tool**. In the Add tools window, find **Razorpay**. You can search for it, or look under External tools. Click it.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F6mmy1ZatzRz9xJindnkF%2Fimage.png?alt=media&amp;token=2dbd8213-18e0-4700-947c-fa65f7343ee4" alt=""><figcaption></figcaption></figure>

2. On the Connect step, choose the account you want. If you have none, click **Connect another account** and sign in without leaving the page. Click **Continue**.

<figure><img src="https://1745791824-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAPDb8cKQtGlIAfgHjcsQ%2Fuploads%2F3Qfwjnols6ipsH9r2NBM%2Fimage.png?alt=media&amp;token=ac745ff1-0a36-4a66-a261-47153b6b8ab2" alt=""><figcaption></figcaption></figure>

3. On the Configure step, fill in: Default currency (optional). Turn on the actions you want the agent to use. Under "How should the agent use Razorpay?", write when the agent should use the tool and what it should do. This is required.
4. Click **Add tool**. The button stays grey until the required fields are filled. The tool now shows under Connected tools with an Active label. Click **Done**, then click **Update** to save the page.

***

### Example usage instructions

> Use Razorpay to collect payments from customers through payment links.
>
> Create payment link: Use this only after the customer has agreed to pay and confirmed the amount. Ask for any missing detail first (name, phone or email, amount, what the payment is for). Create the link and share it with the customer. Tell them the amount and what it is for. Never create a link for an amount the customer has not confirmed.
>
> Check payment link: Use this when the customer says they have paid, or asks if their payment went through. Look up the link and tell them the status. If it is not paid yet, ask them to try the link again. Never say a payment is received until the tool shows it as paid.
>
> Cancel payment link: Only when the customer clearly says they no longer want to pay, or the amount was wrong. Ask "Do you want me to cancel this payment link?" and cancel only after they say yes. If the amount was wrong, offer to create a new link.
>
> Rules: Never create more than one link for the same order. Never share another customer's payment details. Never ask for card numbers, UPI PINs or OTPs in the chat. If the tool gives an error, say "I could not create the payment link right now" and offer to connect them with the team. Never say a link was created or cancelled until the tool confirms it.

Write your own in the same way: say when to use the tool, then what to do.

***

### Change or remove the tool

Under Connected tools, click the gear icon to open the tool's settings again. Click the delete icon to remove it. You are asked to confirm. Deleting removes the tool and its usage instructions from the agent. The connected account stays, so other agents can still use it.

***

### Common errors

<details>

<summary>The agent does not use the tool</summary>

Check that the tool shows Active under Connected tools. Check that the action you need is allowed. Make your usage instructions clearer about when to use the tool.

</details>

<details>

<summary>I cannot save the tool</summary>

The usage instructions are required. Fill them in. Also fill in the other required fields.

</details>

<details>

<summary>I do not see Razorpay in the Add tools window</summary>

Your partner may not have turned this integration on. Ask your partner or account owner.

</details>

<details>

<summary>The Continue button is grey</summary>

Choose an account first. If you have none, click Connect another account.

</details>

<details>

<summary>Can I use the same account for more than one agent?</summary>

Yes. Connected accounts belong to your account, so other agents can use them.

</details>

<details>

<summary>What happens if I delete the tool?</summary>

The agent can no longer use it, and its usage instructions are removed. Text about the tool in your prompt stays, so remove it too.

</details>

***

### Support

Still not working? Write to us at <support@botpenguin.com>. We will reach out to you within 24 hours.
