# Upload bank transfer receipt

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/managers/store/reverse-orders/refund/upload-bank-receipt:
    post:
      summary: Upload bank transfer receipt
      deprecated: false
      description: >
        Uploads a bank transfer receipt for a refund that was created using the

        zid_bank_transfer payment method.


        **This endpoint is used after a refund has already been created via:**


        `POST /v1/managers/store/reverse-orders/refund`



        It associates the uploaded receipt file with the refund and updates the
        related reverse order.



        :::info[]

        ## ⚠️ Important


        This endpoint is mandatory when the refund payment method is
        `zid_bank_transfer`.


        - Only image files are supported.

        - The refund must already exist.

        :::
      tags:
        - Default module/Apps/Merchant APIs/Reverse Orders
      parameters:
        - name: Authorization
          in: header
          description: >-
            The Authorization token is a unique key given to the third-party
            application (Partner) by Zid. It is used to authenticate the API
            requests made by the Partner application. The token verifies the
            partner's identity and ensures they have permission to access Zid's
            API but does not provide any specific user or store information. It
            should be included in the header of API requests when the partner
            application needs to access Zid's API.
          required: true
          example: '{{Autherization}}'
          schema:
            type: string
        - name: X-MANAGER-TOKEN
          in: header
          description: >-
            Unique manager token used to authorize requests at a manager level,
            specific to each partner.
          required: true
          example: '{{Access-Token}}'
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: Language preference.
          required: true
          example: en
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                refund_id:
                  type: string
                  format: uuid
                  description: >-
                    The unique identifier of the refund for which the bank
                    transfer receipt is being uploaded.
                  example: f3a9b2d4-92f7-4d1b-a123-abc123456789
                bank_transfer_receipt:
                  type: string
                  format: binary
                  description: >-
                    Image file representing the bank transfer receipt. Allowed
                    formats: jpeg, jpg, png, gif, bmp, webp. Maximum file size
                    is 5 MB.
                  example: ''
              required:
                - refund_id
                - bank_transfer_receipt
            examples: {}
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      order_reverse:
                        type: object
                        description: >-
                          The updated reverse order after attaching the bank
                          transfer receipt.
                        properties:
                          id:
                            type: string
                            format: uuid
                            description: Reverse order UUID.
                            examples:
                              - 550e8400-e29b-41d4-a716-446655440000
                          refund:
                            type: object
                            description: >-
                              Refund information associated with the reverse
                              order.
                            properties:
                              id:
                                type: string
                                format: uuid
                                description: Refund UUID.
                                examples:
                                  - f3a9b2d4-92f7-4d1b-a123-abc123456789
                              payment_method:
                                type: string
                                description: Refund payment method.
                                examples:
                                  - zid_bank_transfer
                              amount:
                                type: number
                                description: Refunded amount.
                                examples:
                                  - 100.5
                              bank_transfer_receipt:
                                type: string
                                description: >-
                                  Public or signed URL of the uploaded bank
                                  transfer receipt image.
                                examples:
                                  - >-
                                    https://cdn.zid.store/refunds/receipt_12345.png
                              status:
                                type: string
                                description: >-
                                  Current status of the refund after receipt
                                  upload.
                                examples:
                                  - processing
                            x-apidog-orders:
                              - id
                              - payment_method
                              - amount
                              - bank_transfer_receipt
                              - status
                            x-apidog-ignore-properties: []
                        x-apidog-orders:
                          - id
                          - refund
                        x-apidog-ignore-properties: []
                    x-apidog-orders:
                      - order_reverse
                    x-apidog-ignore-properties: []
                x-apidog-orders:
                  - data
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Success
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: >-
                  Response returned when the request cannot be authenticated
                  because the required credentials are missing, invalid, or
                  expired.
                properties:
                  status:
                    type: string
                    description: Indicates the overall status of the API response.
                    examples:
                      - error
                  message:
                    type: object
                    description: >-
                      Contains structured details explaining why the request
                      could not be authenticated.
                    properties:
                      type:
                        type: string
                        description: Indicates the category of the response message.
                        examples:
                          - error
                      code:
                        type: string
                        description: >-
                          A machine-readable code identifying the authentication
                          error. Returns null when no specific code is
                          available.
                        examples:
                          - UNAUTHORIZED
                        nullable: true
                      name:
                        type: string
                        description: >-
                          A short, human-readable title describing the
                          authentication error. Returns null when no title is
                          available.
                        examples:
                          - Unauthorized
                        nullable: true
                      description:
                        type: string
                        description: >-
                          A human-readable explanation of why the request could
                          not be authenticated. Returns null when no detailed
                          explanation is available.
                        examples:
                          - >-
                            Authentication credentials are missing, invalid, or
                            expired.
                        nullable: true
                    required:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-orders:
                      - type
                      - code
                      - name
                      - description
                    x-apidog-ignore-properties: []
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                examples:
                  - status: error
                    message:
                      type: error
                      code: UNAUTHORIZED
                      name: Unauthorized
                      description: >-
                        Authentication credentials are missing, invalid, or
                        expired.
                x-apidog-ignore-properties: []
              examples:
                '1':
                  summary: Example 1
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_MISSING
                      name: Sorry
                      description: Please login first.
                '2':
                  summary: Example 2
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Login session expired. Please login again.
                '3':
                  summary: Example 3
                  value:
                    status: error
                    message:
                      type: error
                      code: ERROR_SESSION_INVALID
                      name: Sorry
                      description: Invalid authentication
          headers: {}
          x-apidog-name: Unauthorized
        '500':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the error.
                  message:
                    $ref: '#/components/schemas/ResponseEnvelopMessage'
                required:
                  - status
                  - message
                x-apidog-orders:
                  - status
                  - message
                x-apidog-ignore-properties: []
              example:
                status: error
                message:
                  type: error
                  code: MSG_HIDDEN
                  name: Error
                  description: Internal Server Error
          headers: {}
          x-apidog-name: Internal Server error
      security: []
      x-apidog-folder: Default module/Apps/Merchant APIs/Reverse Orders
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/613905/apis/api-27461116-run
components:
  schemas:
    ResponseEnvelopMessage:
      type: object
      properties:
        type:
          type: string
          description: Type of response message returned by the API.
          examples:
            - success
        code:
          type: string
          description: Response code returned by the API, if available.
          examples:
            - MSG_POPUP_OK
          nullable: true
        name:
          type: string
          description: Name or title of the response message, if available.
          examples:
            - Coupons
          nullable: true
        description:
          type: string
          description: Detailed description of the response message, if available.
          examples:
            - Coupons created successfully
          nullable: true
      required:
        - type
        - code
        - name
        - description
      description: Additional response metadata.
      x-apidog-orders:
        - type
        - code
        - name
        - description
      x-apidog-ignore-properties: []
      x-apidog-folder: ''
  securitySchemes: {}
servers:
  - url: https://api.zid.sa/
    description: Prod Env
security: []

```
