> ## 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.

# Retry Subscription Charge

> Applicable only for Periodic Subscriptions. Use this API to retry the last failed payment for a subscription in ON HOLD state. On a successful retry, the subscription gets activated. Use the Retry API when the subscription debit has failed at your customer's end. Only one retry attempt is allowed per day and 3 retry attempts are allowed for a failed transaction within the cycle. Retry is not allowed if the current cycle expires.



## OpenAPI

````yaml post /api/v2/subscriptions/{subReferenceId}/charge-retry
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/{subReferenceId}/charge-retry:
    post:
      tags:
        - Subscription
      summary: Retry Subscription Charge
      description: >-
        Applicable only for Periodic Subscriptions. Use this API to retry the
        last failed payment for a subscription in ON HOLD state. On a successful
        retry, the subscription gets activated. Use the Retry API when the
        subscription debit has failed at your customer's end. Only one retry
        attempt is allowed per day and 3 retry attempts are allowed for a failed
        transaction within the cycle. Retry is not allowed if the current cycle
        expires.
      operationId: retrySubscriptionCharge
      parameters:
        - name: X-Client-Id
          in: header
          required: true
          schema:
            type: string
            description: Client ID provided by Cashfree.
            example: asdf1234
        - name: X-Client-Secret
          in: header
          required: true
          schema:
            type: string
            description: Client Secret provided by Cashfree.
            example: qwer9876
        - name: subReferenceId
          in: path
          required: true
          schema:
            type: integer
            description: The reference ID of the subscription to retry the charge.
            example: 2646214
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                nextScheduledOn:
                  type: string
                  format: date
                  description: Date for the next scheduled retry.
                  example: '2021-12-17'
      responses:
        '200':
          description: Successful retry of the subscription charge.
          content:
            application/json:
              examples:
                Retry Subscription Charge Success:
                  value:
                    status: OK
                    subStatus: ON_HOLD
                    payment:
                      paymentId: 3293789
                      amount: 1
                      status: PENDING
                      addedOn: '2021-12-17 08:41:30'
                      retryAttempts: 2
        '400':
          description: Bad request due to missing parameters or invalid subscription state.
          content:
            application/json:
              examples:
                Missing Scheduled Date:
                  value:
                    status: ERROR
                    subCode: '400'
                    message: scheduledOn is mandatory for the payment mode
                OnDemand Subscription Retry Error:
                  value:
                    status: ERROR
                    subCode: '400'
                    message: >-
                      Retrying on on-demand plans not allowed, Please try to
                      create another on-demand charges
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the API call.
                    example: ERROR
                  message:
                    type: string
                    description: Error message.
                    example: Server encountered an unexpected condition.

````