# Apply for refund

> Submit a refund request for a transaction in a deposit notification webhook.

```yaml
openapi: 3.1.0
x-onerway-docs-version: original
x-onerway-spec-key: embedded-finance/refunds/apply-refund
info:
  title: Apply for refund
  version: original
  description: Submit a refund request for a transaction in a deposit notification webhook.
servers:
  - url: https://sandbox-baas.onerway.com/embedded-finance
    description: sandbox
  - url: https://baas.onerway.com
    description: production
paths:
  /api/v2/refund/apply:
    post:
      summary: Apply for refund
      description: Submit a refund request for a transaction in a deposit notification
        webhook.
      parameters:
        - name: apiKey
          in: header
          required: true
          description: API key assigned for Embedded Finance API access.
          schema:
            type: string
            description: API key assigned for Embedded Finance API access.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                rechargeId:
                  type: integer
                  description: Recharge ID for which a refund is requested.
                reasonForReturn:
                  type: string
                  description: Reason for the refund request.
                  enum:
                    - AccountCannotBeIdentified
                    - Other
                  x-enum-descriptions:
                    AccountCannotBeIdentified: The account cannot be identified.
                    Other: Another reason.
              required:
                - rechargeId
                - reasonForReturn
            examples:
              default:
                summary: Apply for a refund
                value:
                  rechargeId: 12345678
                  reasonForReturn: AccountCannotBeIdentified
      responses:
        "200":
          description: Refund request succeeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  respCode:
                    type: string
                    description: Response code returned by Onerway. `20000` indicates that the
                      request succeeded.
                  respMsg:
                    type: string
                    description: Human-readable response message.
                  data:
                    type:
                      - object
                      - "null"
                    properties:
                      {}
                    description: Response data; null in the success example.
                    x-onerway-value:
                      nullable: true
              examples:
                success:
                  summary: Refund request succeeded
                  value:
                    respCode: "20000"
                    respMsg: Success
                    data: null
      security:
        - apiKeyAuth:
            []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: apiKey
```
