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

# Create Plan

This API is used to create a subscription plan.

### Request Body

```json theme={null}
{
  "name": "string", // Name of the subscription plan
  "amount": "integer", // Amount in cents/paisa
  "currency": "string", // Currency code (e.g., USD, INR)
  "interval": "string", // Billing interval (e.g., monthly, yearly)
  "hash": "string" // Calculated hash for request validation
}
```

### Responses

#### 200 OK

```json theme={null}
{
  "status": true,
  "plan_id": "string",
  "message": "Plan created successfully"
}
```

#### 400 Bad Request

```json theme={null}
{
  "status": false,
  "error": {
    "message": "Invalid request",
    "code": 400
  }
}
```


## OpenAPI

````yaml POST /api/v1/subscription/plan/create
openapi: 3.1.0
info:
  title: Orchestration
  version: '1'
servers:
  - url: https://api.paytring.com
security:
  - sec0: []
paths:
  /api/v1/subscription/plan/create:
    post:
      summary: Create Plan
      operationId: create-plan
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - description
                - amount
                - frequency
                - key
                - mer_reference_id
                - hash
                - cycle
              properties:
                title:
                  type: string
                description:
                  type: string
                amount:
                  type: string
                currency:
                  type: string
                frequency:
                  type: integer
                  description: no of days
                  format: int32
                key:
                  type: string
                  description: Merchant key, available in dashboard profile section
                mer_reference_id:
                  type: string
                hash:
                  type: string
                  description: >-
                    to be calculated by key sort of all non-object key values of
                    this request
                notes:
                  type: object
                  properties:
                    udf1:
                      type: string
                      description: max length 255, no special chars
                    udf2:
                      type: string
                      description: max length 255, no special chars
                    udf3:
                      type: string
                      description: max length 255, no special chars
                    udf4:
                      type: string
                      description: max length 255, no special chars
                    udf5:
                      type: string
                      description: max length 255, no special chars
                cycle:
                  type: integer
                  description: how many times will we deduct this money.
                  default: 12
                  format: int32
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      security: []
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````