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

# Generate Transaction Return Summary

> Use this API to generate transaction return summary for failed transactions (insufficient balance). You will have to hit the API again to check the status of the transaction return summary, or go to the [Merchant Dashboard](https://merchant.cashfree.com/merchants) and download the same.



## OpenAPI

````yaml post /api/v2/subscriptions/charge/{paymentId}/transaction-return-summary/generate
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/charge/{paymentId}/transaction-return-summary/generate:
    post:
      tags:
        - Subscription
      summary: Generate Transaction Return Summary
      description: >-
        Use this API to generate transaction return summary for failed
        transactions (insufficient balance). You will have to hit the API again
        to check the status of the transaction return summary, or go to the
        [Merchant Dashboard](https://merchant.cashfree.com/merchants) and
        download the same.
      operationId: generateTransactionReturnSummary
      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: paymentId
          in: path
          required: true
          schema:
            type: integer
            description: >-
              The ID of the payment whose transaction return summary is to be
              generated.
            example: 123456
      responses:
        '200':
          description: Successful generation of the transaction return summary.
          content:
            application/json:
              examples:
                Status Generated:
                  value:
                    status: 200
                    message: Transaction return summary status fetched successfully.
                    data:
                      paymentId: 123456
                      status: GENERATED
                      link: <download-link>
                Status Initialized:
                  value:
                    status: 200
                    message: Transaction return summary status fetched successfully.
                    data:
                      paymentId: 123456
                      status: INITIALIZED
        '400':
          description: Bad request due to invalid parameters or payment ID.
          content:
            application/json:
              examples:
                Invalid Payment:
                  value:
                    title: REQUEST_INVALID
                    detail: Payment is not valid for bounce memo generation.
                    status: ERROR
                    subCode: '400'
                    message: Payment is not valid for bounce memo generation.
                Payment Does Not Exist:
                  value:
                    title: PAYMENT_DOES_NOT_EXIST_EXCEPTION
                    detail: 'Payment Does not exist for id: 235123'
                    status: ERROR
                    subCode: '400'
                    message: 'Payment Does not exist for id: 235123'
        '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.

````