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

# Fetch Single Plan

***

## icon: calendar-search

# Fetch Plan

Use the Fetch Plan API to retrieve the details of a specific subscription plan using its unique KwikPaisa Neo Bank generated `plan_id`.

This API returns the plan configuration, including its name, description, amount, currency, billing frequency, total billing cycles, status, and associated metadata.

***

## Endpoint

```text theme={null}
GET /api/v3/pg/plan/{plan_id}
```

***

#### To view all available base URLs and environments, refer to:

➡️ [API Resources](https://docs.kwikpaisa.com/guide/quick-start/api-resources.md)

#### This endpoint requires standard KwikPaisa Neo Bank authentication headers.

Refer to:

➡️ [Headers](https://docs.kwikpaisa.com/guide/authentication/headers.md)\
➡️ [Signature Generation](https://docs.kwikpaisa.com/guide/authentication/signature.md)\
➡️ [Timestamp Validation](https://docs.kwikpaisa.com/guide/authentication/timestamp.md)

***

## Request Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `plan_id` | String | Yes | Unique KwikPaisa Neo Bank plan ID (`plan_...`) passed in the URL path |

***

## Example cURL Request

```text theme={null}
curl --request GET \
--url https://sandbox.kwikpaisa.com/api/v3/pg/plan/plan_7ec2fc01-2361-45ea-945b-936d88251844 \
--header "Accept: application/json" \
--header "X-API-KEY: pk_test_xxxxxxxxx" \
--header "X-TIMESTAMP: GENERATED_TIMESTAMP" \
--header "X-SIGNATURE: GENERATED_SIGNATURE"
```

***

## Signature Generation

For this GET request, generate the signature using an empty payload.

```text theme={null}
$timestamp = time();
$payload = [];

$sortPayload = function ($data) use (&$sortPayload) {
    if (!is_array($data)) {
        return $data;
    }

    ksort($data);

    foreach ($data as $key => $value) {
        $data[$key] = $sortPayload($value);
    }

    return $data;
};

$sortedPayload = $sortPayload($payload);
$jsonPayload = json_encode($sortedPayload, JSON_UNESCAPED_SLASHES);

$signature = hash_hmac(
    'sha256',
    $jsonPayload . $timestamp,
    $secretKey
);
```

***

## Example Success Response

```text theme={null}
{
  "success": true,
  "message": "Plan fetched successfully",
  "plan": {
    "plan_id": "plan_7ec2fc01-2361-45ea-945b-936d88251844",
    "name": "Monthly Gold Plan",
    "description": "Monthly subscription plan",
    "amount_type": "fixed",
    "amount": "699.00",
    "currency": "INR",
    "frequency": "monthly",
    "interval_count": 1,
    "total_cycles": 12,
    "status": "active",
    "metadata": {
      "package": "gold",
      "purpose": "subscription"
    },
    "created_at": "2026-11-11T10:26:22.000000Z",
    "updated_at": "2026-11-11T10:26:22.000000Z"
  }
}
```

***

## Response Parameters

| Parameter | Description |
| :- | :- |
| `success` | Indicates whether the plan was fetched successfully |
| `message` | API response message |
| `plan.plan_id` | Unique KwikPaisa Neo Bank generated plan ID |
| `plan.name` | Name of the subscription plan |
| `plan.description` | Plan description |
| `plan.amount_type` | Plan amount type (`fixed` or `variable`) |
| `plan.amount` | Subscription amount |
| `plan.currency` | Plan currency |
| `plan.frequency` | Billing frequency |
| `plan.interval_count` | Number of frequency intervals between billing cycles |
| `plan.total_cycles` | Total number of billing cycles |
| `plan.status` | Current plan status |
| `plan.metadata` | Merchant-defined additional plan information |
| `plan.created_at` | Plan creation timestamp |
| `plan.updated_at` | Plan last update timestamp |

***

## Important Notes

* Provide a valid `plan_id` in the endpoint URL.
* The `plan_id` must be generated by KwikPaisa Neo Bank during plan creation.
* The API retrieves the plan associated with the authenticated merchant account.
* Store the returned `plan_id` for future subscription operations.
* The `amount` is returned as a decimal string.
* Generate API signatures on your server only.
* Never expose your secret key in frontend applications.
* Use HTTPS for all API requests.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.