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

# Refund Invoice

> This API can be used to raise a refund against a particular invoice. Webhook events will be pushed for any refund status updates. The response of this API is the Refund Transaction created against the invoice. Once the Refund transaction is marked successful, a credit note will be issued. The **Get Transaction API** can also be used to check the refund transaction status.

**Note:** In the Sandbox Environment, the refund will be auto-processed 10 seconds after the request is initiated.



## OpenAPI

````yaml /api-reference/invoices/invoice.json post /invoice/v1.0/createRefund
openapi: 3.0.3
info:
  title: Invoice API
  description: API's to get invoice information.
  version: 1.0.0
servers:
  - url: https://sandbox-api.transactbridge.com
    description: Sandbox Environment
  - url: https://api.transactbridge.com
    description: Production Environment
security:
  - ApiKeyAuth: []
    SignatureAuth: []
paths:
  /invoice/v1.0/createRefund:
    post:
      tags:
        - Invoice
      summary: Refund Invoice
      description: >-
        This API can be used to raise a refund against a particular invoice.
        Webhook events will be pushed for any refund status updates. The
        response of this API is the Refund Transaction created against the
        invoice. Once the Refund transaction is marked successful, a credit note
        will be issued. The **Get Transaction API** can also be used to check
        the refund transaction status.


        **Note:** In the Sandbox Environment, the refund will be auto-processed
        10 seconds after the request is initiated.
      operationId: createRefund
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - invoiceId
              properties:
                invoiceId:
                  type: string
                  description: Invoice ID
                comment:
                  type: array
                  description: Comments for future use
                  items:
                    type: object
                    additionalProperties: true
                referenceId:
                  type: string
                  description: Partner's reference ID
                mode:
                  type: string
                  description: Mode of payment
                meta:
                  type: object
                  description: >-
                    To add meta params in the session. They will be passed in
                    the webhook and query API as well.
                  properties:
                    param1:
                      type: string
                      maxLength: 256
                      description: String with a max length of 256 characters.
                    param2:
                      type: string
                      maxLength: 256
                      description: String with a max length of 256 characters.
                    param3:
                      type: string
                      maxLength: 256
                      description: String with a max length of 256 characters.
      responses:
        '200':
          description: Refund invoice details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/createRefund'
components:
  schemas:
    createRefund:
      type: object
      properties:
        status:
          type: string
          description: The response from the API
        sub_status:
          type: string
          description: Used for internal purposes only
        data:
          type: object
          description: Refund invoice data
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Merchant API Key
    SignatureAuth:
      type: apiKey
      in: header
      name: x-signature
      description: Generated request signature

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.