> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaanha.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Payments

> Create and send Stripe payment links directly from WhatsApp conversations, plus subscription billing for your Kaanha AI plan.

# Payments

Kaanha AI handles two related but distinct things:

1. **Subscription billing** — your monthly/yearly Kaanha AI plan (Free / Starter / Pro / Premium / Enterprise)
2. **Payment links** — collect payments from your customers directly inside WhatsApp conversations

Both flow through **Stripe**, our active payment processor.

***

## Subscription Billing

Your Kaanha AI subscription (see [Subscription Plans](./billing-plans.md)) is billed through Stripe in **USD**.

* **14-day Pro trial** is available on signup — explore Pro features for 14 days, no credit card required
* After the trial, you can subscribe to any tier or stay on Free
* Manage card and invoices at `Settings → Billing`
* All refund requests go through `billing@kaanha.ai` — see the [Refund Policy](https://app.kaanha.ai/refund-policy) for eligibility and process

***

## Supported Payment Providers (for Payment Links)

| Provider   | Currencies                        | Status for new signups      |
| ---------- | --------------------------------- | --------------------------- |
| **Stripe** | USD, EUR, GBP, INR, AUD, and more | **Active — default**        |
| Razorpay   | INR                               | Inactive (legacy code only) |
| PayPal     | USD                               | Inactive (legacy code only) |

> **Stripe is the active payment provider for new accounts.** Razorpay and PayPal exist in the platform code for legacy compatibility but are **not enabled for new signups**. All new payment-link traffic flows through Stripe Checkout.

***

## Setup (Payment Links)

1. Go to **Settings → Payments**
2. Add your **Stripe** credentials:
   * **Secret Key** (`sk_live_...`)
   * **Webhook Secret** (`whsec_...`, for payment confirmation webhooks)

All credentials are encrypted at rest with AES-256-GCM.

> Razorpay and PayPal credential fields may still appear in the UI for organizations migrated from older versions of the platform. New signups should use Stripe only.

***

## Creating a Payment Link

1. Go to **Payments → Create Link**
2. Fill in:

| Field           | Description                           |
| --------------- | ------------------------------------- |
| **Amount**      | Payment amount                        |
| **Currency**    | INR / USD / EUR etc.                  |
| **Description** | What the payment is for               |
| **Contact**     | (Optional) Link to a specific contact |
| **Expiry**      | (Optional) Link expiry date           |

3. Copy the link and share via WhatsApp chat

***

## Sending from Chat

While in a conversation:

1. Click the **Payment** icon in the chat toolbar
2. Create or select an existing payment link
3. It's sent as a message with the payment URL

***

## Tracking Payments

The **Payments** page shows all links with:

* Amount and currency
* Status: Pending / Paid / Expired
* Contact name and phone
* Created date

**Filters:**

* By status
* By date range

***

## Payment Webhooks

When a payment is completed:

1. Stripe sends a webhook to Kaanha AI
2. Kaanha AI verifies the signature using your `whsec_` webhook secret
3. The payment link status updates to **Paid**
4. A `payment.completed` event fires to your outgoing webhooks
5. You can automate follow-up messages via sequences or webhooks

**Webhook URL:**

```
Stripe: https://app.kaanha.ai/api/webhooks/stripe
```

> Legacy Razorpay (`/api/payments/webhook`) and PayPal (`/api/webhooks/paypal`) endpoints remain in code but are not part of the active payments path for new signups.

***

## Revenue Attribution

Revenue from payment links is tracked in **Analytics → Revenue**:

* Total attributed revenue
* Conversion rate (links paid / links created)
* Revenue by day chart
* Per-broadcast revenue contribution

***

## Related

* [Subscription Plans](./billing-plans.md) — pricing tiers, AI credit allocations, contact / user limits
* [Refund Policy](https://app.kaanha.ai/refund-policy) — refund eligibility and how to request one
* [Billing support](mailto:billing@kaanha.ai) — `billing@kaanha.ai`
