# Refund

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/v0/payment/{transactionId}/refund:
    post:
      summary: Refund
      deprecated: false
      description: ''
      operationId: refundTransactionByTransactionId
      tags:
        - Payment Gateway/APIs - Payment Gateway /Refund
        - order-controller
      parameters:
        - name: transactionId
          in: path
          description: >-
            The transaction id for which you want to initiate refund, this the
            successful transactionId generated post successful payment against
            transaction
          required: true
          example: ''
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
        - name: merchantAccessKey
          in: header
          description: ''
          required: true
          example: ''
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RefundRequest'
            example:
              amount: '100'
              remarks: refund testing payu
              requestId: EK576354215522333D33233005
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApplicationResponseRefundResponse'
          headers: {}
          x-apidog-name: OK
      security: []
      x-apidog-folder: Payment Gateway/APIs - Payment Gateway /Refund
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/616243/apis/api-8990254-run
components:
  schemas:
    RefundRequest:
      required:
        - amount
        - requestId
      type: object
      properties:
        amount:
          type: number
          description: The amount to be refunded.
        remarks:
          type: string
          description: Additional remarks or comments regarding the refund.
        requestId:
          type: string
          description: The unique identifier for the refund request.
      x-apidog-orders:
        - amount
        - remarks
        - requestId
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    ApplicationResponseRefundResponse:
      type: object
      properties:
        response_code:
          type: integer
          format: int32
        response_message:
          type: string
        payload:
          $ref: '#/components/schemas/RefundResponse'
      x-apidog-orders:
        - response_code
        - response_message
        - payload
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
    RefundResponse:
      type: object
      properties:
        amount:
          type: number
          description: The amount associated with the transaction.
        paymentMode:
          type: string
          description: The mode of payment used for the transaction.
          enum:
            - NET_BANKING
            - UPI
            - CREDIT_CARD
            - DEBIT_CARD
            - PREPAID_CARD
            - PAY_LATER
            - WALLET
            - CORPORATE_CARD
            - UPI_CREDIT_CARD
          x-apidog-enum:
            - value: NET_BANKING
              name: ''
              description: ''
            - value: UPI
              name: ''
              description: ''
            - value: CREDIT_CARD
              name: ''
              description: ''
            - value: DEBIT_CARD
              name: ''
              description: ''
            - value: PREPAID_CARD
              name: ''
              description: ''
            - value: PAY_LATER
              name: ''
              description: ''
            - value: WALLET
              name: ''
              description: ''
            - value: CORPORATE_CARD
              name: ''
              description: ''
            - value: UPI_CREDIT_CARD
              name: ''
              description: ''
        bankCode:
          type: string
          description: The code identifying the bank associated with the transaction.
        bankName:
          type: string
          description: The name of the bank associated with the transaction.
        currency:
          type: string
          description: The currency in which the transaction amount is specified.
        status:
          type: string
          description: The current status of the transaction.
          enum:
            - CREATED
            - PENDING_WITH_BANK
            - SUCCESS
            - FAILED
          x-apidog-enum:
            - value: CREATED
              name: ''
              description: ''
            - value: PENDING_WITH_BANK
              name: ''
              description: ''
            - value: SUCCESS
              name: ''
              description: ''
            - value: FAILED
              name: ''
              description: ''
        transactionId:
          type: string
          description: The unique identifier for the transaction.
        txnMsg:
          type: string
          description: Additional message or information related to the transaction.
        txnDate:
          type: string
          description: The date when the transaction was initiated.
        uniqueTransactionId:
          type: string
          description: The unique identifier for the transaction.
        bankTransactionId:
          type: string
          description: The identifier provided by the bank for the transaction.
      x-apidog-orders:
        - amount
        - paymentMode
        - bankCode
        - bankName
        - currency
        - status
        - transactionId
        - txnMsg
        - txnDate
        - uniqueTransactionId
        - bankTransactionId
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://ekpayout-uat.enkash.in
    description: Testing Env
security: []

```
