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

# Get refund status

> Retrieve the status of a previously created refund.
You can trigger the check of the status of a refund at any moment you consider pertinent. 
However, every time a refund changes its status, we will send you a notification containing 
the ID of the refund so that you can check its status back to retrieve the new refund's status.

Regarding the Authorization value, since the body of the requests will be empty, you should use 
an empty ("") string or nothing as the jsonPayload field for generating the signature.


## Retrieve Refund Status

> Retrieve the status of a previously created refund.\
> You can trigger the check of the status of a refund at any moment you consider pertinent. \
> However, every time a refund changes its status, we will send you a notification containing \
> the ID of the refund so that you can check its status back to retrieve the new refund's status.\
> \
> Regarding the Authorization value, since the body of the requests will be empty, you should use \\


## OpenAPI

````yaml open-api-yaml/deposits-api/manage-refunds/get-refund-status.json GET /refunds/{refund_id}
openapi: 3.0.0
info:
  title: Refund Status API
  version: v3
servers:
  - url: https://api-stg.pandablue.com/v3
    description: Staging environment
security: []
paths:
  /refunds/{refund_id}:
    get:
      tags:
        - Refunds
      summary: Retrieve Refund Status
      description: >
        Retrieve the status of a previously created refund.

        You can trigger the check of the status of a refund at any moment you
        consider pertinent. 

        However, every time a refund changes its status, we will send you a
        notification containing 

        the ID of the refund so that you can check its status back to retrieve
        the new refund's status.


        Regarding the Authorization value, since the body of the requests will
        be empty, you should use 

        an empty ("") string or nothing as the jsonPayload field for generating
        the signature.
      parameters:
        - name: refund_id
          in: path
          description: Eron refund_id. It is obtained when creating the refund.
          required: true
          schema:
            type: integer
        - name: voucher
          in: query
          description: >-
            true / false value. The request with `true` value will return the
            refund invoice in base64 to be decoded to create a .pdf file.
          required: false
          schema:
            type: boolean
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
          description: >-
            Media type of the request. For GET, this is typically
            `application/json` if any specific content negotiation is implied by
            the server, even without a body.
        - name: X-Date
          in: header
          required: true
          schema:
            type: string
            format: date-time
          description: ISO8601 Datetime with Timezone (yyyy-MM-dd'T'HH:mm:ssZ).
        - name: X-Login
          in: header
          required: true
          schema:
            type: string
          description: Merchant X-Login API Key.
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
          description: >-
            Authentication signature. The signature is generated based on
            specific headers and an empty payload for GET requests.
        - name: X-Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            format: uuid
          description: >-
            Unique idempotency key for ensuring that the same request is not
            processed more than once. (Generally more applicable for
            state-changing requests like POST, PUT, DELETE).
      responses:
        '200':
          description: Refund status successfully retrieved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundStatusSuccess'
        '401':
          description: >-
            Unauthorized access. This could be due to an invalid X-Login,
            X-Date, or Authorization signature.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  description:
                    type: string
        '404':
          description: The refund with the specified `refund_id` could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefundNotFoundError'
components:
  schemas:
    RefundStatusSuccess:
      type: object
      properties:
        deposit_id:
          type: integer
          description: ID of the deposit refunded.
        merchant_invoice_id:
          type: string
          description: Merchant invoice id of the deposit refunded.
        status:
          type: string
          description: >
            Status of the refund. 

            Possible values:

            - `PENDING`: The refund request has been created and is awaiting
            processing.

            - `DELIVERED`: The refund has been sent for processing.

            - `COMPLETED`: The refund has been successfully processed.

            - `INCORRECT_DETAILS`: More information is needed, or details were
            incorrect.

            - `REJECTED`: The refund was rejected (e.g., by the bank).

            - `CANCELLED`: The refund was manually cancelled (only possible in
            PENDING or INCORRECT_DETAILS).
          enum:
            - PENDING
            - DELIVERED
            - COMPLETED
            - INCORRECT_DETAILS
            - REJECTED
            - CANCELLED
        amount:
          type: number
          format: float
          description: >-
            Amount of the refund. This field is typically present when the
            status is `COMPLETED`.
        voucher:
          type: string
          format: byte
          description: >-
            Proof of refund in base64 coding for generation of a .pdf file.
            Included in the response only if `voucher` is sent as `true` in the
            query parameters.
      description: >-
        Details of the refund status. The API may add more fields to this
        response object in the future; integrations should be tolerant of new
        fields.
      title: RefundStatusSuccess
    RefundNotFoundError:
      type: object
      properties:
        code:
          type: integer
          description: Error code indicating resource not found.
        description:
          type: string
          description: A human-readable description of the error.
        type:
          type: string
          description: The type of error.
      title: RefundNotFoundError

````

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