# Easebuzz Payment Gateway Integration – Rapidbott

## Easebuzz Payment Gateway Integration – Rapidbott

### Overview

The **Easebuzz Payment Gateway Integration** on Rapidbott enables businesses to securely collect payments directly from chatbot conversations using Easebuzz checkout.

With this integration, you can:

* Generate payment links dynamically
* Collect payments via WhatsApp, Web, Instagram, and other channels
* Track payment status inside chatbot flows
* Automate post-payment actions using triggers

***

### Supported Use Cases

* One-time product payments
* Service and booking charges
* Advance or partial payments
* Event registrations
* Invoice-based collections

***

### Prerequisites

Before installing the integration, ensure:

1. An **active Easebuzz merchant account**
2. Access to **Easebuzz API credentials**
3. A Rapidbott workspace with **Mini App access enabled**

***

### Installing the Easebuzz Integration

#### Step 1: Access Mini App Store

1. Login to your **Rapidbott Dashboard**
2. Select the required **Workspace**
3. Navigate to:\
   Mini Apps → App Store

***

#### Step 2: Install Easebuzz Mini App

1. Locate **Easebuzz Payment Gateway**
2. Click **Install**
3. The Easebuzz Mini App will be added to your workspace

***

#### Step 3: Configure Easebuzz Credentials

After installation:

1. Open **Mini Apps → Easebuzz**
2. Enter the required credentials:
   * Merchant Key
   * Salt Key
   * Environment (Test / Live)
3. Save the configuration

***

### Easebuzz Credentials Explained

Easebuzz uses two mandatory credentials to authenticate and secure payment requests.

***

#### Merchant Key

**What is Merchant Key?**

The **Merchant Key** is a unique identifier assigned to your Easebuzz merchant account.\
It identifies the merchant initiating the payment request.

**Where to Find Merchant Key**

1. Login to the **Easebuzz Merchant Dashboard**
2. Go to:\
   Account Settings → API Credentials
3. Copy the **Merchant Key**

***

#### Salt Key

**What is Salt Key?**

The **Salt Key** is a secure secret used to:

* Generate request hashes
* Verify request authenticity
* Protect payment data from tampering

This key must be kept confidential.

**Where to Find Salt Key**

1. Login to the **Easebuzz Merchant Dashboard**
2. Navigate to:\
   Account Settings → API Credentials
3. Copy the **Salt Key**

***

#### Environment-Based Keys

Easebuzz provides separate credentials for each environment.

| Environment | Merchant Key      | Salt Key      |
| ----------- | ----------------- | ------------- |
| Test        | Test Merchant Key | Test Salt Key |
| Live        | Live Merchant Key | Live Salt Key |

Always ensure the selected environment matches the keys used.

***

### Creating a Payment Link

The Easebuzz Mini App generates a secure checkout link using the provided payment details.

***

#### Mandatory Payment Fields

| Field         | Description                  |
| ------------- | ---------------------------- |
| Amount        | Payment amount               |
| Currency      | Default: INR                 |
| Customer Name | Name of the payer            |
| Phone Number  | Mandatory and validated      |
| Email Address | Mandatory and validated      |
| Reference ID  | Unique transaction reference |

***

### Amount Rules

* Must be numeric
* Up to **two decimal places**
* Examples:
  * `10.00`
  * `199.50`

***

### Phone Number Validation (Mandatory)

Easebuzz performs **strict phone number validation**.

#### India

* Exactly **10 digits**
* Example: `9876543210`
* No spaces or special characters

Invalid phone numbers will cause **payment link generation to fail**.

***

### Email Validation (Mandatory)

* Must be provided
* Must be in valid email format
* Example: `customer@example.com`

Missing or invalid emails will block payment creation.

***

### Supported Currency

* Default currency: **INR**
* Use only currencies enabled in your Easebuzz account

***

### Payment Flow

1. User reaches payment step in chatbot
2. Rapidbott sends payment request to Easebuzz
3. Easebuzz generates checkout link
4. User completes payment
5. Easebuzz sends payment status
6. Rapidbott triggers corresponding action

***

### Payment Triggers in Rapidbott

Rapidbott automatically listens for payment status updates.

***

#### Available Triggers

| Trigger         | Description                                  |
| --------------- | -------------------------------------------- |
| Payment Success | Fired when payment is completed successfully |
| Payment Failed  | Fired when payment fails or is cancelled     |

***

#### Payment Success Trigger

Triggered when:

* Payment is successful
* Transaction ID is generated
* Payment status is confirmed

Common actions:

* Send confirmation message
* Share invoice or receipt
* Continue chatbot flow
* Notify admin or CRM

***

#### Payment Failed Trigger

Triggered when:

* Payment fails
* User cancels payment
* Validation error occurs

Common actions:

* Ask user to retry payment
* Offer alternate payment option
* Escalate to support

***

### Common Issues & Troubleshooting

#### Payment Link Not Generated

Check the following:

1. Phone number is missing or invalid
2. Email address is missing or invalid
3. Amount format is incorrect
4. Merchant Key or Salt Key is incorrect
5. Environment does not match keys

***

#### Authentication / Hash Errors

Possible causes:

* Incorrect Salt Key
* Mixed Test and Live credentials
* Wrong environment selection

***

### Best Practices

* Always validate phone and email before payment
* Use a unique reference ID for each transaction
* Handle both success and failure triggers
* Test thoroughly in **Test Mode** before Live
* Keep Salt Key confidential

***

### Example Chatbot Payment Flow

1. Collect customer name, phone, email
2. Confirm payable amount
3. Generate Easebuzz payment link
4. Wait for payment response
5. Trigger success or failure path

***

### Summary

* Easebuzz integration enables secure chatbot payments
* Merchant Key identifies your account
* Salt Key secures transactions
* Phone and email are mandatory
* Rapidbott triggers automate post-payment actions

***
