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

# Create Seamless Subscription with Plan ID

> Use this API to create a subscription by providing a custom payment experience to your customers by specifying the plan ID and the customer details. You can also specify the bank account information when you create the subscription to ensure that mandates are created via the specified bank account only. TPV is applicable only for eNACH and UPI.



## OpenAPI

````yaml post /api/v2/subscriptions/seamless/subscription
openapi: 3.0.0
info:
  title: Cashfree Subscription API
  description: >-
    Create and manage subscriptions and collect recurring payments from
    customers easily with Cashfree Subscriptions.
  version: v2
servers:
  - url: https://sandbox.cashfree.com
    description: Sandbox server
  - url: https://api.cashfree.com
    description: Production server
security: []
externalDocs:
  url: https://docs.cashfree.com/reference/postman-collection-1
  description: This url will have the information of all the APIs.
paths:
  /api/v2/subscriptions/seamless/subscription:
    post:
      tags:
        - Seamless APIs
      summary: Create Seamless Subscription with Plan ID
      description: >-
        Use this API to create a subscription by providing a custom payment
        experience to your customers by specifying the plan ID and the customer
        details. You can also specify the bank account information when you
        create the subscription to ensure that mandates are created via the
        specified bank account only. TPV is applicable only for eNACH and UPI.
      operationId: createSeamlessSubscriptionWithPlanId
      parameters:
        - name: x-client-id
          in: header
          schema:
            type: string
            example: '{{X-Client-Id}}'
        - name: x-client-secret
          in: header
          schema:
            type: string
            example: '{{X-Client-Secret}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                subscriptionId:
                  type: string
                  description: Unique identifier for the subscription.
                  example: DemoSubscription
                planId:
                  type: string
                  description: Unique identifier for the subscription plan.
                  example: TestPlan_ReArch_002
                customerName:
                  type: string
                  description: Name of the customer subscribing.
                  example: John
                customerPhone:
                  type: string
                  description: Customer's phone number.
                  example: 99999XXXXX
                customerEmail:
                  type: string
                  description: Customer's email address.
                  example: john@gmail.com
                returnUrl:
                  type: string
                  description: URL to redirect the user after successful subscription.
                  example: www.google.com
                authAmount:
                  type: number
                  description: Authorization amount for the subscription.
                  example: 1
                expiresOn:
                  type: string
                  description: Expiration date for the subscription.
                  example: '2024-12-02 09:20:12'
                firstChargeDate:
                  type: string
                  description: First charge date for the subscription.
                  example: '2024-12-02'
                payerAccountDetails:
                  type: object
                  properties:
                    accountNumber:
                      type: string
                      description: Customer's account number.
                      example: '007200000000'
                    accountHolderName:
                      type: string
                      description: Name of the account holder.
                      example: John
                    bankId:
                      type: string
                      description: Bank identifier.
                      example: ICIC
                    accountType:
                      type: string
                      description: Type of the bank account.
                      example: SAVINGS
                    ifsc:
                      type: string
                      description: IFSC code of the bank.
                      example: ICIC0000072
                notificationChannels:
                  type: array
                  items:
                    type: string
                    description: Notification channels for subscription.
                    example: EMAIL
                  example:
                    - EMAIL
                    - SMS
                tpvEnabled:
                  type: boolean
                  description: Whether Third Party Verification (TPV) is enabled.
                  example: true
                splitDetails:
                  type: object
                  properties:
                    scheme:
                      type: array
                      items:
                        type: object
                        properties:
                          merchantVendorId:
                            type: string
                            description: Vendor ID for split payments.
                            example: test-vendor-1
                          percentage:
                            type: number
                            description: Percentage of split payment.
                            example: 10
            examples:
              createSeamlessSubscriptionWithoutTPV:
                summary: Create Seamless Subscription without TPV
                value:
                  subscriptionId: DemoSubscription
                  planId: TestPlan_ReArch_002
                  customerName: John
                  customerPhone: 99999XXXXX
                  customerEmail: john@gmail.com
                  returnUrl: www.google.com
                  authAmount: 1
                  expiresOn: '2024-12-02 09:20:12'
                  firstChargeDate: '2024-12-02'
                  payerAccountDetails:
                    accountNumber: '007200000000'
                    accountHolderName: John
                    bankId: ICIC
                    accountType: SAVINGS
                    ifsc: ICIC0000072
                  notificationChannels:
                    - EMAIL
                    - SMS
              createSeamlessSubscriptionWithTPV:
                summary: Create Seamless Subscription with TPV enabled
                value:
                  subscriptionId: DemoSubscription
                  planId: TestPlan_ReArch_002
                  customerName: ''
                  customerPhone: '9999988888'
                  customerEmail: demo.email@gmail.com
                  returnUrl: www.google.com
                  authAmount: 1
                  expiresOn: '2024-12-02 09:20:12'
                  firstChargeDate: '2024-12-02'
                  tpvEnabled: true
                  payerAccountDetails:
                    accountNumber: 0072XX52XXXX
                    accountHolderName: John
                    bankId: ICIC
                    accountType: SAVINGS
                    ifsc: ICIC0000072
                  notificationChannels:
                    - EMAIL
                    - SMS
              createSeamlessSubscriptionWithSplitDetails:
                summary: Create Seamless Subscription with Split Details
                value:
                  subscriptionId: DemoSubscription
                  planId: TestPlan_ReArch_002
                  customerName: John
                  customerPhone: 99999XXXXX
                  customerEmail: john@gmail.com
                  returnUrl: www.google.com
                  authAmount: 1
                  expiresOn: '2024-12-02 09:20:12'
                  firstChargeDate: '2024-12-02'
                  payerAccountDetails:
                    accountNumber: '007200000000'
                    accountHolderName: John
                    bankId: ICIC
                    accountType: SAVINGS
                    ifsc: ICIC0000072
                  notificationChannels:
                    - EMAIL
                    - SMS
                  splitDetails:
                    scheme:
                      - merchantVendorId: test-vendor-1
                        percentage: 10
                      - merchantVendorId: test-vendor-2
                        percentage: 10
      responses:
        '200':
          description: Successful subscription creation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    description: Status code of the response.
                    example: 200
                  message:
                    type: string
                    description: Status message.
                    example: Subscription Created
                  data:
                    type: object
                    properties:
                      subReferenceId:
                        type: integer
                        description: Subscription reference ID.
                        example: 107350
                      subscriptionId:
                        type: string
                        description: Unique identifier for the created subscription.
                        example: DemoSubscription
                      customerPhone:
                        type: string
                        description: Customer's phone number.
                        example: '9999988888'
                      customerEmail:
                        type: string
                        description: Customer's email address.
                        example: demo.email@gmail.com
                      planId:
                        type: string
                        description: Unique identifier for the subscription plan.
                        example: TestPlan_ReArch_002
                      status:
                        type: string
                        description: Current status of the subscription.
                        example: INITIALIZED
                      currentCycle:
                        type: integer
                        description: Current subscription cycle.
                        example: 0
                      authAmount:
                        type: number
                        description: Authorization amount for the subscription.
                        example: 1
                      returnUrl:
                        type: string
                        description: >-
                          URL to redirect the user after successful
                          subscription.
                        example: www.google.com
                      startDate:
                        type: object
                        properties:
                          E_MANDATE:
                            type: string
                            description: Start date for E_MANDATE payment type.
                            example: '2024-12-02'
                          UPI:
                            type: string
                            description: Start date for UPI payment type.
                            example: '2024-12-02'
                      endDate:
                        type: string
                        description: Expiration date for the subscription.
                        example: '2024-12-02 09:20:12'
                      tpvEnabled:
                        type: boolean
                        description: Indicates if TPV is enabled.
                        example: false
                      paymentOptions:
                        type: array
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              description: Type of payment option.
                              example: E_MANDATE
                            accountTypes:
                              type: array
                              items:
                                type: string
                              description: Available account types for the payment option.
                              example:
                                - SAVINGS
                                - CURRENT
                            frequentBankDetails:
                              type: array
                              items:
                                type: object
                                properties:
                                  bankId:
                                    type: string
                                    description: Bank identifier.
                                    example: SBIN
                                  bankName:
                                    type: string
                                    description: Name of the bank.
                                    example: STATE BANK OF INDIA
                                  accountAuthModes:
                                    type: array
                                    items:
                                      type: string
                                    description: Authorization modes for the bank.
                                    example:
                                      - DEBIT_CARD
                                      - NET_BANKING
        '400':
          description: Invalid subscription input.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the response.
                    example: ERROR
                  subCode:
                    type: string
                    description: Error code.
                    example: '400'
                  message:
                    type: string
                    description: Error message.
                    example: Invalid subscription expiresOn
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the response.
                    example: ERROR
                  message:
                    type: string
                    description: Error message.
                    example: Server encountered an unexpected condition.

````